Posted By

luizlopes on 12/11/09


Tagged

javascript plugin jquery images img slideshow


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

verostudios


Simple Slideshow


 / Published in: jQuery
 

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

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

  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. });

Report this snippet  

You need to login to post a comment.