A simple question: Why can I do this
var start = function() {
$('#element').animate({}, 5000, 'linear', start);
}
but not this
function start() {
$('#element').animate({}, 5000, 'linear', start());
}
?
The first works perfectly, restarting the animation after it completes. The second simply causes an infinite loop.