I want to animate a div by changing it's top property like so:
var loadingFrame = 1; loadingFrame = (loadingFrame + 1) % 12;
// Loading animation
jQuery('div.ModalLoading div').animate('top', (loadingFrame * -40) + 'px');
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.
EDIT: This based upon the loading in FancyBox --> http://fancybox.net/ if that helps anyone debug my 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');
}