Hello,
Is there a way to wait for hide function in a loop? I mean if I have this structure in html:
<div class='example'>
<span> One </span>
<span> Two </span>
<span> Three </span>
<div>
And in js I want to do something like this:
$('.example span').each(function(i, span) {
$(span).hide('slow');
});
I believe js is asynchronous so it will not wait for hide to end, but maybe there is a way which I don't know to wait until hide animation finishes and continue on next element?