Skip to content

Instantly share code, notes, and snippets.

@seanhandley
Created January 16, 2012 19:27
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 seanhandley/1622508 to your computer and use it in GitHub Desktop.
Save seanhandley/1622508 to your computer and use it in GitHub Desktop.
$(this).submit(function(){
$.ajax({
type: 'POST',
url: $(this).attr('action'),
data: $(this).serialize(),
success: function(data, status, xhr){
my_function_goes_here(data);
},
error: function(data,status,xhr) {
console.log(xhr);
console.log(data.responseText);
}
});
return false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment