What I want:
Within $myElement find all elements with class .myClass and attribute display:none. Below is what I have tried, I’ve probably missed something stupid:
$myElement.find('.myClass[display=none]')
and
$myElement.find('.myClass').filter('[display=none]')
You can use the
:hiddenpseudo-selector:The syntax you proposed refers to the attributes of the element, not to the style definitions. In essence, your selector would have matched an element like so:
Which doesn’t really make much sense.
If you want to be explicit about
displaybeing “none” (as elements can be hidden in other ways also), you can use.filter():