[jQuery] Re: removing table rows except the first one

2009-08-19 Thread Liam Potter
Have fun :) con-man-jake wrote: It works! Thank you Liam. jake On Aug 19, 11:22 am, Liam Potter wrote: $("#tbl tbody tr:not(:first-child)").remove(); con-man-jake wrote: Can anyone please confirm the syntax of what I am doing I have a table with id="tbl", it has 4 rows.

[jQuery] Re: removing table rows except the first one

2009-08-19 Thread con-man-jake
It works! Thank you Liam. jake On Aug 19, 11:22 am, Liam Potter wrote: > $("#tbl tbody tr:not(:first-child)").remove(); > > > > con-man-jake wrote: > > Can anyone please confirm the syntax of what I am doing > > > I have a table with id="tbl", it has 4 rows.  I need to remove all > > rows excep

[jQuery] Re: removing table rows except the first one

2009-08-19 Thread Liam Potter
$("#tbl tbody tr:not(:first-child)").remove(); con-man-jake wrote: Can anyone please confirm the syntax of what I am doing I have a table with id="tbl", it has 4 rows. I need to remove all rows except the first one. It has "tbody". Is this the way to do it $("#tbl > tbody > tr:gt(0)").rem