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? -

java - How to create Table using Apache PDFBox -

mpi - Why is MPI_Bsend not returning error even when the buffer is insufficient to accommodate all the messages -