Finding div height after jQuery replaceWith
<p>I need to find and replace a div with the id <code>left_s</code> with a div with id=<code>newdiv</code>. Also, I need to get the <code>height</code> and <code>width</code> of the previous div <code>left_s</code> and apply it to the new div with id=<code>newdiv</code>.</p>

<p>I've got this code, but it's not working:</p>

<pre><code>$('#left_s').replaceWith('&lt;div id="newdiv" &lt;/div&gt;');
var w = $("#newdiv").width();
$(".left_s").width(w);
</code></pre>

<p>///////after ".replaceWith" i can't get height and width from div "left_s" and apply it to "newdiv".</p>
