Disjointed rollover text


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $(document).ready(function () {
  2.  
  3. var initiallink = $(".question a:first");
  4. careerTestimonials(initiallink);
  5.  
  6. $(".question a").click(function (e) {
  7. e.preventDefault();
  8. var link = $(this);
  9. careerTestimonials(link);
  10. });
  11.  
  12. function careerTestimonials(link) {
  13. var timer = 600;
  14. $("#bubble").fadeOut(timer, function () {
  15. var answer = $(link).siblings(".answer").html();
  16. $(".question a").removeClass("selected");
  17. $(link).addClass("selected");
  18. $("#answer").html(answer);
  19. });
  20.  
  21. $("#bubble").fadeIn(timer);
  22. }
  23.  
  24. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.