Quantcast
Channel: jQuery selector with "and" and "or" - Stack Overflow
Viewing all articles
Browse latest Browse all 3

jQuery selector with "and" and "or"

$
0
0

Can somebody help me with the syntax of what I'm trying to do here?

jQuery('(div[data-positiontype="3"]) && (div[data-positiontitle*="test"] || div[data-positiondesc*='test'])')

Basically I need the ability to select all divs that have a particular "data-positiontype" attribute and a token in either the "data-positiontitle" attribute or the "data-positiondesc" attribute.


Viewing all articles
Browse latest Browse all 3

Trending Articles