For example, I have the following code:
var $els = $('elementos'); // cerca de 8 elementos selecionados
Then from this group of elements, I want an element that has the class active
. I tried something like:
$els.find('.active');
But it did not work, because the find
method looks for child elements. I have not tried the siblings
method since I have more than one element selected and they are not necessarily "siblings".
How to find a certain element in this group and then be able to navigate between them as next()
and prev()
, is it possible?