Replace HTML tag with a new tag
<p>How can I replace the <code>html</code> tag with a new tag using jQuery?</p>

<p>I have many <code>table</code> tags and I want to replace a specific table containing a class. All of its' child nodes should be replaced too.</p>

<pre><code>&lt;table class='replace_this'&gt;
    &lt;tr&gt;
        &lt;td&gt;
            All table, tr, and td tag are replaced with div tag
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>Should be changed to:</p>

<pre><code>&lt;div class='replace_this'&gt;
    &lt;div&gt;
        &lt;div&gt;
            All table, tr, and td tag are replaced with div tag
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
