replaceWith is not replacing the attributes of the top id
<pre><code>&lt;div id='one' class='foo'&gt;Hello&lt;/div&gt;

$('#one').replaceWith("&lt;div id='one'&gt;World&lt;/div&gt;")
</code></pre>

<p>Above code is producing </p>

<pre><code>&lt;div id='one' class='foo'&gt;World&lt;/div&gt;
</code></pre>

<p>However the desired output is</p>

<pre><code>&lt;div id='one'&gt;World&lt;/div&gt;
</code></pre>

<p>Notice that replaceWith is changing the content inside the div but not the attributes of the div itself.</p>
