jQuery Animate div position
<p>I want to animate a div by changing it's top property like so:</p>

<pre><code>var loadingFrame = 1; loadingFrame = (loadingFrame + 1) % 12;

// Loading animation
jQuery('div.ModalLoading div').animate('top', (loadingFrame * -40) + 'px');
</code></pre>

<p>The idea is that the inner div will look like it is sliding up inside the ModalLoading div, and needs to continue infinite. At the moment the div is stationary. Thanks.</p>

<p>EDIT: This based upon the loading in FancyBox --> <a href="http://fancybox.net/" rel="nofollow">http://fancybox.net/</a> if that helps anyone debug my code.</p>

<pre><code>div.ModalLoading
{
    height: 40px; width: 40px; margin: 0 auto 20px; overflow: hidden; z-index: 1104; position: relative;
}
div.ModalLoading div
{
    position: absolute; top: 0; left: 0; width: 40px; height: 480px; background: url('loading.png');
}
</code></pre>
