bloor

imageslider

Jun 18th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.     var current = 1;
  3.     setInterval(function(){
  4.         $('#container img.active:nth-child('+current+')').fadeOut();
  5.        
  6.         n = $("#container img").size();
  7.         current = ((current+1) % n) ? (current+1) % n : n;
  8.         current =
  9.  
  10.         $('#container img.active:nth-child('+current+')').fadeIn();
  11.     });
  12. </script>
Advertisement
Add Comment
Please, Sign In to add comment