What is the best method in jQuery to add an additional row to a table as the last row?
Is this acceptable?
$(\'#myTable\').append(\'
-
I was having some related issues, trying to insert a table row after the clicked row. All is fine except the .after() call does not work for the last row.
$('#traffic tbody').find('tr.trafficBody).filter(':nth-child(' + (column + 1) + ')').after(insertedhtml);
I landed up with a very untidy solution:
create the table as follows (id for each row):
...
...
...
etc ...
and then :
$('#traffic tbody').find('tr.trafficBody' + idx).after(html);
- 热议问题