I have a div that uses two CSS classes. Here's the HTML:
<div class="box1"></div>
<div class="box1 destaque"></div>
<div class="box2"></div>
<div class="box2 destaque"></div>
<div class="box3"></div>
I want to select the div
that has the classes box1
and destaque
(in my example the second div) just .
What I've already tried:
If I do: $('.box1')
I select the two divs with class box1
. It's not what I want.
And if I do: $('.destaque')
I just selected a div with box1
and another with box2
(which I do not want)
I tried $('.box1 .destaque')
but did not select anything.
So how should I mount the jQuery selector to fetch the divs that use the box1 and highlight classes?