title: Get height of a div dynamically created
body: <p>i have create a div class=box via Ajax call and appended to an main  div.
  This div class=box change its height based on its content. I need to have its height but  .height() return 0....</p>
  
  <pre><code>$.ajax({  url: "json/news.json",
        dataType: "json",  
        contentType: "application/x-www-form-urlencoded;charset=UTF-8",
        success: function(data){
            var html ="&lt;div class='box'&gt;"+data.box+"&lt;/div&gt;"; 
        } 
    });
   // now i want its height 
   var j = $('.box').height();
  </code></pre>
  
  <p>Any suggestion? Thanks</p>