How to prepend a tr to after first tr at a table?

kamaci picture kamaci · Mar 4, 2011 · Viewed 21.2k times · Source

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?

Answer

Mark Steggles picture Mark Steggles · Mar 4, 2011

You will want to use jquery after, like this:

$('#myTable tr:first').after($tr);