I'm working with an unordered list of links that has two levels:
<ul class="level-1">
<li class="item-a"><a href="#">A</a></li>
<li class="item-b"><a href="#">B</a>
<ul class="level-2">
<li class="item-1"><a href="#">1</a></li>
<li class="item-2"><a href="#">2</a></li>
<li class="item-3"><a href="#">3</a></li>
</ul>
</li>
<li class="item-c"><a href="#">C</a></li>
</ul>
I click one of the .level-2 links, and want to select the higher level link from the list that contains the clicked link. (For example, I click either 1, 2, or 3 - and I want to select B.)
If my clicked link is selected as $(this).find('a')
-- how can I select the higher level link?
Would appreciate your advice!