tags:

views:

47

answers:

2
$("#experiences tr").gt(0).dblclick(function() {
    $(this).remove();
});

I used the above code to exclude the first row,

but it turned out to be wrong.

double click on all rows has no response now.

+2  A: 
$("#experiences tr:gt(0)").dblclick(function() {
    $(this).remove();
});

or

$("#experiences tr:not(:first)").dblclick(function() {
    $(this).remove();
});

exclude just the second row:

$("#experiences tr:not(:eq(1))").dblclick(function() {
    $(this).remove();
});
John Sheehan
What if I want to exclude the 2nd row?
Shore
just the second row?
John Sheehan
why isn't there a ne for "not equal"?
Shore
Because there's already :not :)
John Sheehan
+2  A: 

Better to use a class for the rows.

Add a class for the rows that you want to wire double click event and it will be easier.

rahul