show a string of my div and append
<p>How do I show a string representation of my div emptied then append to it?</p>

<pre><code> var x = $('#myDiv').outerHTML(); 
x = x.empty().append('&lt;h1&gt;test&lt;/h1&gt;');


//result must look like  &lt;div id="myDiv"&gt;&lt;h1&gt;test&lt;/h1&gt;&lt;/div&gt;
</code></pre>
