Jquery FadeIn/Out Continuous Rotator


/ Published in: jQuery

Simple jQuery fadeIn/Out continuous rotator.


Copy this code and paste it in your HTML
  1. $(function() {
  2. // Set first div to show
  3. $('.testimonials div:first').show();
  4.  
  5. // Begin the loop, fade out, find next div, fade that div in, end the process and append back to main div.
  6. setInterval(function() {
  7. $('.testimonials div:first-child').fadeOut().next('div').fadeIn().end().appendTo('.testimonials');
  8. }, 5000);
  9. )};

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.