/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(document).ready(function () { var initiallink = $(".question a:first"); careerTestimonials(initiallink); $(".question a").click(function (e) { e.preventDefault(); var link = $(this); careerTestimonials(link); }); function careerTestimonials(link) { var timer = 600; $("#bubble").fadeOut(timer, function () { var answer = $(link).siblings(".answer").html(); $(".question a").removeClass("selected"); $(link).addClass("selected"); $("#answer").html(answer); }); $("#bubble").fadeIn(timer); } });