A simple question: Why can I do this
var start = function() { $(\'#element\').animate({}, 5000, \'linear\', start); }
but not this
In the second example, you are basically doing a recursive call to start().
start()
What you want to do is pass the function start itself, like you are doing in your first example. Your second example is only providing the result of calling start().