Simple Slideshow


/ Published in: jQuery
Save to your folder(s)

$('.fadein').slideShow(300);


Copy this code and paste it in your HTML
  1. $.fn.slideShow = function(timeOut) {
  2. var $elem = this;
  3. this.children(':gt(0)').hide();
  4. setInterval(function() {
  5. $elem.children().eq(0).fadeOut().next().fadeIn().end().appendTo($elem);
  6. }, timeOut || 3000);
  7. };
  8.  
  9. $(function() {
  10. $('.fadein').slideShow();
  11. });

URL: http://snook.ca/archives/javascript/simplest-jquery-slideshow#c64387

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.