Skip to content

Instantly share code, notes, and snippets.

@thibblen
Created February 16, 2011 14:17
Show Gist options
  • Save thibblen/829431 to your computer and use it in GitHub Desktop.
Save thibblen/829431 to your computer and use it in GitHub Desktop.
var data = $(form).serialize();
var url = $(form).attr('action');
$.ajax({
type: 'POST',
url: url,
cache: false,
data: data,
success: function (result) {
$(form).closest('.element').html(result);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment