Skip to content

Instantly share code, notes, and snippets.

@GiovanniK
Created May 21, 2014 20:47
Show Gist options
  • Save GiovanniK/d14e8dfd15a333b7316b to your computer and use it in GitHub Desktop.
Save GiovanniK/d14e8dfd15a333b7316b to your computer and use it in GitHub Desktop.
Ajax submit form
$.ajax({
type: "POST",
url: "form.php",
data: $('#form').serialize(),
beforeSend: function() {
$('#form').append('<div class="alert alert-success save-message">Saving...</div>');
},
success: function(data) {
$('.save-message').remove();
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment