How do I unwrap all parents using jQuery?
<pre><code>&lt;p&gt;&lt;span&gt;&lt;a href="link"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</code></pre>

<p>How would I unwrap everything leaving just <code>&lt;a href="link"&gt;&lt;/a&gt;</code>?</p>

<p>-edit-</p>

<p>Sorry, I should have provided more information. Basically, I'm trying to target all <code>a</code>'s that are the only child of <code>span</code>'s which are surrounded by <code>p</code> tags. I was hoping the following would do the trick but it only unwrapped the <code>p</code> tags. I was wondering if there was a way to remove the <code>span</code> tags as well.</p>

<p><code>$('p &gt; span:only-child &gt; a:only-child').unwrap();</code></p>
