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

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -