For all the other quick readers, here's the updated paid nerd answer given here .
req = $.get('foo.html') .success (response) -> do_something() .error (response) -> do_something()
... compiles to:
var req; req = $.get('foo.html').success(function(response) { return do_something(); }).error(function(response) { return do_something(); });
It seems that a too short dog also suggested this in the comment above.
Mike marcacci
source share