Remove link from list element
Hey,
I'm kind of new to jQuery but I would like to achieve the following... I have the following list:
- <ul class="menu">
- <li><a href="something.html">First main</a></li>
- <li><a href="something.html">Second main</a>
- <ul class="sub-menu">
- <li><a href="something.html">First sub</a></li>
- <li><a href="something.html">Second sub</a></li>
- </ul>
- </li>
- </ul>
Now, I'd like to remove the link from the "Second main" because it has a submenu. I know that I can get that exact item using $("ul.sub-menu").parent() but how do I unwrap the link in it?
Thanks a lot!