我正在尝试将一些JavaScript代码从MicrosoftAjax移动到JQuery.我使用流行的.net方法的MicrosoftAjax中的JavaScript等价物,例如String.format(),String.startsWith()等.在jQuery中它们是否等同于它们?
我想隐藏除第一个之外的所有 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();
});
Run Code Online (Sandbox Code Playgroud)
});