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:>
Nope, this refers to each of the child items. Try it out.
this
Most (if not all) DOM-interacting jQuery callbacks set this to to the DOM element that you're working with.
You could also write:
$('li').children("li").each(function(){ var $this = $(this); });