Get the dynamic height of a clone object
<p>In jQuery, I would like to get the height of a clone object BEFORE it is appended to the body.</p>

<p>Note: I didn't specify the width and height in CSS (this is the requirement).</p>

<p>Is it possible?</p>

<pre><code>&lt;body&gt;

&lt;style&gt;.square {}&lt;/style&gt;

&lt;script&gt;
jQuery(function($) {
    var o = $(".square").clone(true);
    $(o).css('height','auto').html("Some stuff...&lt;br/&gt;&lt;br/&gt;");

    // output 0 (Question: how to get the height?)
    console.log($(o).height());

    $(o).appendTo("body");

    // output the height (i.e. 38)
    console.log($(o).height());
});
&lt;/script&gt;
&lt;div class="square"&gt;&lt;/div&gt;
&lt;/body&gt;
</code></pre>
