Skip to content

Instantly share code, notes, and snippets.

@knorthfield
Last active December 11, 2015 15:39
Show Gist options
  • Save knorthfield/4622717 to your computer and use it in GitHub Desktop.
Save knorthfield/4622717 to your computer and use it in GitHub Desktop.
Randomly fade in elements
$('.elements')
.hide()
.each(function(index, element){
var sleepTime = Math.floor(Math.random() * 2000),
t = setTimeout(function(){
$(element).fadeTo(1000,1);
}, sleepTime);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment