I am appending a html string (var data[‘return’]) to a ul element $(‘#sidebar_append’) which has the following form
<li>item one</li>
<li>item two</li>
<li>item three</li>
I want to create a sequential fadeIn animation for all the children. I’ve tried the following, but it would not fadeIn
$('#sidebar_append')
.hide()
.append(data['return'])
.children()
.each(function() {
$(this).fadeIn('fast')
});
It’s weird as when I do a console.log($(this)) I actually get the li in firebug but no fadeIn.
Nevermind, it’s pretty simple, I forgot that
$('#sidebar_append')is still hidden. You also need a delay to create a sequence animation: