Jquery and closure or function reference not working?
<p>I think it has something to do with a function running in a difference scope from where the jquery library is not accessable (shown being called as the last parameter on the second line below)</p>

<pre><code>var funcExpandHeight = container.animate({
    height: '300px'
}, 300, function () {});
foo.animate({
    height: 'show'
}, 300, funcExpandHeight);
</code></pre>

<p>Line one works, then crashes on <code>'f.easing[i.animatedProperties[this.prop]] is not a function'</code></p>

<p>Munging the lines up together as show below, and the operation completes successfully.</p>

<pre><code>    foo.animate({
     height: 'show'
 }, 300, function () {
     container.animate({
         height: container[0].scrollHeight + 'px'
     }, 300, function () {})
 });
</code></pre>
