This is probably not the best solution, but it should work:
$('li').each(function(i){
var el = this;
setTimeout(function(){
$(el).fadeIn(800);
},800*i)
});
Just for fun, the recursive version:
function animateLi(i){
$('li').eq(i).fadeIn(800);
if ($('li').eq(i+1).length>0)
{
setTimeout(function(){animateLi(i+1)},800);
}
}
animateLi(0);
source
share