I'm trying to slide a div containing a table up, change the rows of the table with ajax calls, and then slide the containing table back down. I can't seem to get the series of callbacks to work effectively.
$("div#grid").slideUp('fast', function() {
//eaery row but the first
$("#testtable tr")
.not(":first")
.filter(":has(input[type='checkbox'][checked])")
.each(function() {
//change html using ajax calls
editrow($(this).attr("id"));
});
})
.slideDown('fast'); // want this to wait until editrow() has been run on each row
editrow() contains ajax calls to edit the html of the given row. The problem is the div slides up, then back down immediately. I need it to wait until the functions have executed on each row, changing the html of the table, before sliding it back down.