<li id="someID">
<div id="div1">Text</div>
<div id="div2">Text x 2</div>
<div id="div3">Text x 3</div>
<span>
<div>
<ul>
<li class="menuItem">Menu Item</li>
</ul>
</div>
</span>
</li>
In short, I'm trying to find the ID "someID" when the class "menuItem" is clicked. The code below doesn't seem to be cutting it.
$('.menuItem').click(function(){alert($(this).closest('li').attr('id'));});