Hello,
I have the following code
<div>
<a href="#" class="clickMe">test</a>
<ul>
<li class="action_li">1</li>
<li class="action_li">2</li>
</ul></div> <div>
<a href="#" class="clickMe">test</a>
<ul>
<li class="action_li">3</li>
<li class="action_li">4</li>
</ul>
and I want to loop on all the <li>
that are enclosed with the same <div>
as the clicked <a>
$("a.clickMe").live("click", function(eve){
eve.preventDefault();
$('.action_li').each(function(index) {
console.debug(this);
});
});
but of course this will get me all the 4 <li>
not the two enclosed
so I want to have something that starts with $(this)
and ends with .each()