Using AND logic in jQuery selectors
Hi guys,
Not sure, but this seams to be a tricky one...
I want to use the selectors to select a certain element, that has two different other elements in it.
For example:
- <div class="main">
- <div class="search01"></div>
- <div class="search02"></div>
- </div>
If I would do that:
- $("div:has(div.search01, div.search02)")
it would return on both elements, so only one need to match.
So basically the , does OR.
But how can I do AND logic, so that both divs inside needs to match?
Is that even possible?
Thanks in advance!