title: jQuery animate div height after dynamic loaded content
body: <p>I load page via AJAX and its content is represented as a string. After that I want to animate container's height if the content is bigger than actual container's height. But, <code>_height</code> is 0. Why ?</p>
  
  <pre><code>function adjustMainContainerHeight() {
      var _height = $('div.content').wrapInner('&lt;div&gt;').outerHeight();
  
      $("div.main").animate({ height: _height  }, 600);
  }
  
  function prepareResult(data) { //data is HTML string returned by server
      $('div.content').html(data);
      adjustMainContainerHeight();
  }
  </code></pre>