Skip to content

Instantly share code, notes, and snippets.

@Kcko
Created April 4, 2014 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kcko/9970136 to your computer and use it in GitHub Desktop.
Save Kcko/9970136 to your computer and use it in GitHub Desktop.
Ajax - with done || fail
$.ajax({ ... }).then(successHandler, failureHandler);
// OR
var jqxhr = $.ajax({ ... });
jqxhr.done(successHandler);
jqxhr.fail(failureHandler);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment