/ Published in: JavaScript

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
setInterval(function(){ var imgs = $$('.fadein img'), visible = imgs.findAll(function(img){ return img.visible(); }); if(visible.length>1) visible.last().fade({ duration: .3 }); else imgs.last().appear({ duration: .3, afterFinish: function(){ imgs.slice(0,imgs.length-1).invoke('show'); } }); }, 3000);
URL: http://snook.ca/archives/javascript/simplest-jquery-slideshow#c64389
Comments
