Created
November 22, 2011 16:30
-
-
Save rutger1140/1386093 to your computer and use it in GitHub Desktop.
Fade in elements with jQuery
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
/** | |
* Self-executing callback chain on an arbitrary jQuery object | |
*/ | |
// Recursively fade in all products | |
(function shownext(jq){ | |
jq.eq(0).fadeIn("fast", function(){ | |
(jq=jq.slice(1)).length && shownext(jq); | |
}); | |
})($('#products .product')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment