$('.update').live('click', function() { $(this).button('loading'); $('#listInserts tr').remove(); updatelist(); $(this).button('reset'); $(this).button('complete'); });
The question is how to make $(this).button('reset');
and $(this).button('complete');
executed after the updatelist();
function is processed updatelist();
, but not immediately?