Hi i'm trying to check if a parent element contains an ID
Here is my list
<ul>
<li></li>
<li id="selected">
<ul>
<li></li>
<li></li>
</ul>
</li>
<li></li>
</ul>
Don't know how to make a correct list in here?
if (jQuery(LiElement).parent("#selected"))
{
//If parent has id=selected
}
else
{
//If parent dont have id=selected
}
Can someone help me please?