How might I do this? I’m trying to use css3 only for performance reasons (fade in can get kind of choppy).
Right now they all happen at the same time.
function fadeInPlaylist(elem) {
elem.css('opacity',1);
}
$(window).load(function() {
$('.playlist').each(function(i) {
setTimeout(fadeInPlaylist($(this)),2500*i);
});
});
You are calling
setTimeoutincorrectly.setTimeout(fadeInPlaylist($(this)),2500*i);should be:
setTimeout(function(){fadeInPlaylist($(this));},2500*i);Also, here’s a working fiddle: http://jsfiddle.net/q7Wa8/