Skip to content

Instantly share code, notes, and snippets.

@dvidsilva dvidsilva/submit.js
Created Oct 20, 2015

What would you like to do?
AJAX submit form with Jquery
$(document).ready(function() {
$('form').submit(function(event) {
var formData = $(this).serialize();
type : 'POST',
url : $(this).attr('action'),
data : formData,
dataType : 'json',
encode : true
}).done(function(data) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.