【发布时间】:2013-10-13 22:40:21
【问题描述】:
我想隐藏除第一个之外的所有 tr。然后我希望每个 tr 在有人点击添加链接时出现。
如何隐藏除第一行之外的所有表格行。
这是我的http://jsfiddle.net/Nx4cD/9/
$( document ).ready(function() {
$(".add").click(function() {
var
$this = $(this),
$row = $this.closest("tr"),
$rowIndex = $row.index();
$row.next().show("medium").find("td").eq(0).html($rowIndex+2);
});
$(".delete").click(function() {
$(this).closest('tr').hide();
});
});
【问题讨论】:
标签: jquery