Not allowing next jqueryui.show() animation to start without finishing previous one
- by Phonethics
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() ?