Zach
Zach

Reputation: 19112

Select Table Row in jQuery

What's the best way for selecting a table row by index using jQuery?

Thanks

Upvotes: 16

Views: 69707

Answers (2)

Quasipickle
Quasipickle

Reputation: 4498

You can do it all in the selector:

$('#tableId tr:eq(4)')

Upvotes: 9

cobbal
cobbal

Reputation: 70785

If you don't have to worry about nested tables:

$('#tableId tr').eq(4)

Upvotes: 27

Related Questions