Possible Duplicate:
Inserting new table row after the first table row using JQuery
I have populated a tr for my table and I want to prepend it after the firts tr. I use this:
$('#myTable').prepend($tr);
As usual, it adds my new tt to the top.
How can I add it as second?
How do you add TR after current TR? Basically, you create a copy from the tr element (which includes child nodes) and insert that copy after that element. Therefore, you need the . live binding to make sure that newly created a elements do also invoke that click handler.
You should not be doing that... is not a valid HTMl markup... Rows can not be wraped by divs.
Shift cells down Insert a cell and move the existing cells down one row. A new row is added at the bottom of the table.
You will want to use jquery after, like this:
$('#myTable tr:first').after($tr);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With