Advertisement
Guest User

Untitled

a guest
Feb 28th, 2013
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Testimonials animation */
  2.  
  3. setTimeout(function() {quotesChange();}, 5000);
  4.              
  5. function quotesChange() {
  6.  
  7.    $(".quotes").each(function(index) {
  8.  
  9.       var quote = $(".quotes").eq(index);
  10.       var current = quote.children("article.quote-selected");
  11.       var next = quote.children("article").eq( current.index() + 1 );
  12.  
  13.       if (next.html() == null) {
  14.          next = quote.children("article").eq(0);
  15.       }
  16.  
  17.       current.removeClass("quote-selected");
  18.       next.addClass("quote-selected");
  19.       next.css("display", "none");
  20.       current.fadeOut(800, function () {
  21.          next.fadeIn(800, function() { });
  22.       });
  23.  
  24.    });
  25.    setTimeout(function() {quotesChange();}, 5000);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement