I clone the hidden row of the table and then fill it, and after checking, I want to show the row using the jquery effect ... say.show ("slow")
var baseRow = $("#tasks tr#baseTaskLine"); var newRow = baseRow.clone(); var lastRow = $("#tasks tr[id^='TaskLine_']" + dayClass + ":last"); var newRowId; if (lastRow.length == 0) { newRowId = "TaskLine_new0"; } else { newRowId = "TaskLine_new" + lastRow[0].rowIndex; } newRow.attr("id", newRowId); : [populate new row] : if (lastRow.length == 0) { baseRow.after(newRow); } else { lastRow.after(newRow); } newRow.hide(); : : [validate via webservice call] : newRow.show("slow");
This shows the line, but it appears instantly. I tried to hide all the <td> elements of the string and then show them, and this seems to work, but some weird styles are added to each <td> that interfere with formatting, i.e. style="display: block;"
source share