jQuery: animate to height of div
<p>I have this function:</p>

<pre><code>function fixedFeeSize(i){
    var num1 = $('#num' + i);
    if (num1.hasClass("extended")) {
      num1.stop(true, true).animate({height: '59px'},500);
      num1.removeClass("extended");
    }else{
      var height = 0;
      num1.animate({height: '360px'},500);
      num1.addClass("extended");
    }
    return null;
}
</code></pre>

<p>Which expands / contracts a div, however I am struggling to get it to expand to the height of the div as each div (there will be 10+) is going to be different heights.</p>

<p>I tried <code>num1.animate({height: 'auto'},500);</code> which has not worked.</p>
