Your Ad Here

Posted By

djalisko191 on 11/16/11


Tagged

jquery


Versions (?)

Disjointed rollover text


 / Published in: jQuery
 

  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  

You need to login to post a comment.