user3364652
user3364652

Reputation: 510

jQuery - how to find specific cell in a table using selectors?

Given each cell has row, col attributes. I've tried something like

$(#mytable tr td row=1 col=1)

But it doesn't work

Upvotes: 0

Views: 741

Answers (1)

Donal
Donal

Reputation: 32803

You can use first-child or nth-child. For example:

$("#mytable tr:first-child td:first-child")

$("#mytable tr:nth-child(1) td:nth-child(1)")

Upvotes: 1

Related Questions