I\'m trying to figure out, when iterating through some list items, how to target each \"$(this)\" equivalent within nested foreach loops. Here is an example of my problem:>
Don't use this! Use function parameters!
this
$('li').each(function(i, li){ $(li).children("li").each(function(ii, li2){ $(li)... $(li2)... }); });
This is more in keeping with the native JavaScript iterators.
...though an can't be the direct child of another