Created
October 4, 2011 13:00
-
-
Save webcracy/1261588 to your computer and use it in GitHub Desktop.
Dead simple JS / jquery slideshow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.slide').each(function() { | |
$(this).hide(); | |
}); | |
(function shownext(jq){ | |
jq.eq(0).fadeIn(500, function(){ | |
$(this).delay(5500).fadeOut(250, function() { | |
if ((jq=jq.slice(1)).length == 0) | |
(jq=$('.slide')).length && shownext(jq); | |
else | |
shownext(jq); | |
});; | |
}); | |
})($('.slide')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment