user3274901
user3274901

Reputation: 21

Using this keyword to select children

What's the syntax for the $this keyword when selecting its child element/s?

For example when selecting images of the first cell in a table: $("this td:eq(0) img"), or, $($this "td:eq(0) img"), etc, like should there be quotes, a dollar sign etc, and if so, where?

Upvotes: 0

Views: 553

Answers (1)

BenM
BenM

Reputation: 53246

Why not just the find() function?

$(this).find('td:eq(0) img');

Upvotes: 1

Related Questions