Get height of dynamically created element
<p>I created one div dynamically and tried to get its height. I didn't assign fixed height to it. But its content is assigned a fixed height. So I tried to get its render height. </p>

<pre><code>$(function(){
    $services = $(&lt;div id="services"&gt;&lt;/div&gt;);
    $img  = $(&lt;img src="abc.jpg" height="100px" width="100px"&gt;);
    $a = $("&lt;a href="home.php"&gt;Go to home&lt;/a&gt;");
    $services.append($img,$a);
});

$(function(){
    var height = $("#services").height();
});
</code></pre>

<p>I got value of height as 0.</p>

<p>So I can't render height of <code>div#services</code>.</p>
