Guest User


a guest
Aug 3rd, 2016
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function(){
  3.     setInterval(function(){
  4.         //get current active images
  5.         var active $('#banners .active');
  6.         // if there is another image(object) left then make that image next
  7.         // if not, go back to the first image of the banners div
  8.         if( > 0 )
  9.             var next =;
  10.         else
  11.             var next = $('#banners img:first');
  12.         //get the next image ready by modifying the z-index
  13.         next.css('z-index','2');
  14.         //Fade out the active image, then
  15.         active.fadeOut(1000,function(){
  16.         //Move the active image to the back of the pile,show it and remove the active class
  17.         active.css('z-index','1').show().removeClass('active');
  18.         //make the next image the active one
  19.         next.css('z-index','3').addClass('active');
  20.         });
  21.     },2500);
  22. });
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.