<ul id="productmenu">
<li>
<a ref="#"></a>
</li>
</ul>
how to check if a link's parent's parent has got an id = "productmenu"? I tried with PrentNode, but it did not work.
<ul id="productmenu">
<li>
<a ref="#"></a>
</li>
</ul>
how to check if a link's parent's parent has got an id = "productmenu"? I tried with PrentNode, but it did not work.
var pid = $(this).closest('ul').attr('id');
if($(this).closest("ul").attr("id") == "productmenu"){
}