2
For example, I have the following code:
var $els = $('elementos'); // cerca de 8 elementos selecionados
So from this group of elements, I want an element that has the class active. I tried something like:
$els.find('.active');
But it didn’t work, because the method find search for child elements. I have not tried the method siblings because I have more than one selected element and they are not necessarily "brothers".
How to find a certain element in this group and then be able to navigate between them as next() and prev(), it is possible?
It’s true, I’d forgotten the
filter. Because then bfavaretto, I already imagined it of the navigation. I noticed that in the object$elhas the objectprevObjectwhich is the previous list, if I have the$elto do the navigation. How to catch it?– KaduAmaral
Look at this: https://jsfiddle.net/ndc1nryh/1/
– KaduAmaral
You go back to the previous list with the
end– https://jsfiddle.net/ndc1nryh/2/– bfavaretto
True. I added an answer with this part, I will complement...
– KaduAmaral