Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does ">" in this jQuery selector mean?

Tags:

jquery

css

What difference does the greater than symbol (>) make here?

Is $('#someElement').find(">[someAttribute]") the same as $('#someElement').find("[someAttribute]")?

like image 508
user2112300 Avatar asked Dec 05 '22 12:12

user2112300


1 Answers

No : it only selects an element if it's a direct child of #someElement.

It's semantically based on the CSS direct child selector.

See child selector's documentation

like image 75
Denys Séguret Avatar answered Dec 23 '22 09:12

Denys Séguret