jquery - how to check parent's parent's id equals -


<ul id="productmenu">     <li>       <a ref="#"></a>     </li> </ul> 

how check if link's parent's parent has got id = "productmenu"? tried prentnode, did not work.

if($(this).closest("ul").attr("id") == "productmenu"){ } 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -