views:

30

answers:

2

how to find first row of a table using jquery?

+4  A: 

You can use :first with a tr element selector, for example:

$("table tr:first")

Or for a specific table:

$("#myTable tr:first")
Nick Craver
assuming your table id is myTable
Shyju
@Shyju - For the second version, yes, the question's a bit unclear. You may also want for example `tbody > tr:first-child` to select them in multiple tables...there are lots of approaches here :)
Nick Craver
i dont think ive ever come across a jQuery question and not seen an answer by Nick Craver =) "The fastest hands in the wild west." +1
RPM1984
+1  A: 

try $("table tr:first")

Fincha