views:

18

answers:

3

Would like to append rows in a small period.

Couldn't do that. :)

Maybe someone here could demonstrate that?

Would be very grateful.

A: 

You can use setInterval.

rahul
Yea, but setInterval won't wait for completion of previous action.
Beck
+1  A: 

you could use window.setTimeout as described here on the mdc.

Diarmuid Bourke
Thanks mate, didn't knew there is third parameter for setTimeout.
Beck
+1  A: 

In theory, something like this:

var timer = 0;
var items = $(".item").hide().each(function() {
    var el = $(this);
    timer += 250;
    window.setTimeout(function() {
        el.show();
    }, timer)
});
Daniel
Not actually what i needed, but anyway thanks for timer logic. Forgot that loop don't wait for timeout. :)
Beck