Here's the method I use on my site (modified a bit to fit your
example), there's probably a better way, but my version is pretty
clean:
function showitems(i,max) {
if (i <= max) {
$('div.items:eq('+i+')').show('slow',function() { showitems(+
+i,max) });
}
}
$(function() {
showitems(0,$('div.items').length);
});
It's a neat effect, I use it on my site CarComplaints.com for instance
here:
http://www.carcomplaints.com/Ford/Focus/2001/
On Dec 16, 6:15 pm, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
wrote:
> hi!
>
> i'm displaying a series of graphical items in one command:
>
> $('div.items").show("slow");
>
> now, it was suggested by my mate that they appear one after the other,
> according to, say, their order of appearance in the html markup.
>
> of course i could use the callback of each show so taht the next one only
> start when current is finished animating, but i don't know in advance the
> amount of divs there will be so i'm kind of stuck on how to achieve that.
>
> Has anyone achieved something like that? Any clue would be useful.
>
> Thank you,
>
> --
> Alexandre