[jQuery] How to fade in next div after previous div faded in upon document.ready ?
Hi all !
I tried but did not succeeded in making this work.
To explain what I'm trying to do.
HTML:
<body>
<div id=first_div>text
</div>
<div id=second_div>text
</div>
<div id=third_div>text
</div>
</body>
CSS not important right now
jQuery:
on document.ready function collect all divs witch id ends with "_div"
first make them all hidden with .hide()
then show them one by one using .fadeIn()
but next div fades in after previous finished fading in
I got the first part:
$(function() {
$('div[@id$=_div]').hide();
});
but how to loop through $('div[@id$=_div]')
and make divs fade in sequentially ?
$('div[@id$=_div]').each(function() {
$(this).fadeIn('slow');
});
this makes all divs to fade in at the same time
what now ?
thanks in advance