我试图弄清楚,在遍历一些列表项时,如何在嵌套的 foreach 循环中定位每个“$(this)”等价物。这是我的问题的一个例子:
$('li').each(function(){
// I believe $(this) would target each li item...
$(this).children("li").each(function(){
// ... but how can I target each of these li items? Doesn't $(this) target the original loop?
});
});