How to remove everything from body apart of one tag with perticular class with jQuery?
<p>This  will be probable quite odd question. But i thought I will give it a go.</p>

<p>Is there a way to remove everything from body apart of one tag that has particular class? </p>

<p>in my case it is an a tag with href.</p>

<p>I need to "fish out" the a tag and then display on DOM just the href tag in lets say p tag.</p>

<pre><code>&lt;body&gt;
 &lt;a class="avatar_user_name" href="/product/xyz"&gt;Title&lt;/a&gt;

...other body tags and text

&lt;a class="avatar_user_name" href="/product/abc"&gt;Title&lt;/a&gt;
&lt;/body&gt;
</code></pre>

<p>and as a result I need to have something like this</p>

<pre><code>&lt;body&gt;
&lt;p&gt;xyz&lt;/p&gt;
&lt;p&gt;abc&lt;/p&gt;
&lt;/body&gt;
</code></pre>

<p>Thank you for any help in advance
Regards</p>
