I want to hide all the tr except the first one. then i want each tr to appear when someone will click on add link.
How can i hide all the table row except the first one.
here is my 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();
});
});