I'm trying to add a row to a table with jquery. I would like to add the row in first position, but not the very first, I want it to come after the row dedicated to the column headers 'th'. If I try
$('#tableid').prepend()
obviously the new row comes before the one of 'th's. Any idea of how to do that?
Assuming your first
tr
that holds theth
you could do:Or you if have them separated out into thead and tbody then you could just do.
Demo