Last active
August 31, 2016 14:15
-
-
Save chihebnabil/e2380dc7093ae7af46212d923fc682df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function () { | |
$('#my_form').on('submit', function (e) { | |
// prevent browser from submitting the form | |
e.preventDefault(); | |
var $form = $(this); | |
$.ajax({ | |
url: $form.attr('action'), | |
type: $form.attr('method'), | |
data: $form.serialize(), | |
success: function (response) { | |
//server responce | |
} | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment