I can't figure out if this is possible, basically want to run an each function on every article and run another each function inside that each function on every li in that article, is this possible? I can post more details later.
The jQuery $.each() function is just a loop. It iterates through the item that the selector returns. Since this is the case, if you select every UL on the page, then while viewing that UL item, you select all li items for that UL, then so on and all spans in each li. You can go on forever if the items are there. It doesn't matter, it is just a loop.
$.each("ul", function(index, element)
{
var $this = $(this);
var $items = $this.find("li");
//now next loop
$.each($items, function(n, e)
{
//this is each li in this ul
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With