Not allowing next jqueryui.show() animation to start without finishing previous one

Posted by Phonethics on Stack Overflow See other posts from Stack Overflow or by Phonethics
Published on 2010-04-20T14:27:42Z Indexed on 2010/04/20 14:33 UTC
Read the original article Hit count: 207

Filed under:
|

Im using jquery &jquery UI.

$.each(data, function(count,item)
{
    showItem(item); // Dont continue without showItem finishing
});

function showItem(item)
{
    $('#div-container').prepend(renderItem(item));    
    $("#div-container div.block:first").show('blind',{},500,function(){});    
}

Works, but when there are 3 items in data, it animates all 3 in one go. I need this done one-by-one. How do I tell .show() to execute the next show() after the previous one is completed ? Or do I specify this in each() ?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui