Lets say I have this html :
<ul> <li class="cls">one</li> <li class="cls active">tow</li> <li class="cls">here</li> <li class="cls">after</li> </ul>
I'm selecting all
.cls by this jquery selector :
$('.cls') and put them in a variable:
c is an array of object now. I want to select
.active item in this array by jQuery methods.
I do know i can use
$('.cls.active') but this is not what I'm lookin for. I want to use
Is there any solution ?
c.find('.active') not working, because
.find() searching in childs.