<ul>
<li><a href="#">LEVEL 1</a>
<ul>
<li>...</li>
</ul>
</li>
<li><a href="#">LEVEL 1</a>
<ul>
<li>...</li>
</ul>
</li>
</ul>
I have a nested list and I want to use jQuery to add class to the LI that containts A>LEVEL 1
based on this condition: if a nested UL exists AFTER UL LI A, do x else y
.
Thanks.