as the title states, I am trying to iterate over a collection of child elements, the trouble comes in when I try to fade them out one at a time, I am using $.each()
to try and achieve this, but it seems to be fading everything out at once, what I would like it to do is wait for the animation to finish and then go to the next child element and fade that out, here is my code,
jQuery:
var children = $("container").children();
children.each(function(){
$(this).fadeOut('slow');
})
HTML:
<div id="container">
<div style="background: #F00;"></div>
<div style="background: #00F;"></div>
<div style="background: #0F0;"></div>
</div>
also, would it be possible to trigger an animation before the current one has finished, but delaying it by a set interval?
Thanks in advance!