Remove link from list element

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:

  1. <ul class="menu">
  2.    <li><a href="something.html">First main</a></li>
  3.    <li><a href="something.html">Second main</a>
  4.             <ul class="sub-menu">
  5.                  <li><a href="something.html">First sub</a></li>
  6.                  <li><a href="something.html">Second sub</a></li>
  7.             </ul>
  8.    </li>
  9. </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!