for the following html
<div>
<div class="col1" >
I dont want to select this
</div>
<div class="col2">
I dont want to select this
</div>
<div class="col1">
I dont want to select this
</div>
<div class="col1">
I dont want to select this
</div>
<div class="col2">
I WANT to select this
</div>
</div>
How do I select the last element with two different class names?
Tried using
$("col1:last,col2:last)
but it gives back 2 elements
tried
$("col1,col2:last")
and this gives all col1 and last of col2