/ Published in: jQuery
$('.fadein').slideShow(300);
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$.fn.slideShow = function(timeOut) { var $elem = this; this.children(':gt(0)').hide(); setInterval(function() { $elem.children().eq(0).fadeOut().next().fadeIn().end().appendTo($elem); }, timeOut || 3000); }; $(function() { $('.fadein').slideShow(); });
URL: http://snook.ca/archives/javascript/simplest-jquery-slideshow#c64387