Possible Duplicate:
Inserting new table row after the first table row using JQuery可能重复:使用JQuery在第一个表行之后插入新表行
I have populated a tr for my table and I want to prepend it after the firts tr. I use this:
我为我的桌子填充了一个tr,我想在firts tr之后添加它。我用这个:
$('#myTable').prepend($tr);
As usual, it adds my new tt to the top.
像往常一样,它将我的新tt添加到顶部。
How can I add it as second?
如何将其添加为秒?
26
You will want to use jquery after, like this:
您将需要在之后使用jquery,如下所示:
$('#myTable tr:first').after($tr);
6
You can do one thing keep the first tr to 你可以做一件事保持表的第一个tr到并将tr放到表的。 Now do 现在做 0 You need to use 你需要使用.after of the table and rest tr to
of the table.
$('#myTable tbody').prepend($tr);
#3
.after
$('#myTable > tbody > tr:first').after($tr);
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有