I have a jQuery animation that positively refuses to loop. It will play through the animation once and then quit.
Here it is: http://stackoverflow.quickmediasolutions.com/stackad/fancy.html
Here is the relevant section of code:
function DoAgain()
{
$('#block').stop().css('marginLeft','0px');
var width = ($('#block').width()) / 2;
var length = (1000 * num_ads) / document.getElementById('speed').value;
$('#block').animate({marginLeft: '-=' + width},length,'linear',
function() {
DoAgain();
});
}
I tried to debug the application with the Chrome JavaScript console, but according to it, everything works. (No errors, DoAgain()
gets called fine, etc.)
I am really stuck here - a nudge in the right direction would be appreciated.