Created
May 30, 2015 22:17
-
-
Save folmert/b3bed10afc32d1aef896 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // http://malsup.github.io/min/jquery.form.min.js | |
| // <script type="text/javascript" src="{}jquery.form.min.js"></script> | |
| function showRequest(formData, jqForm, options) { | |
| var queryString = jQuery.param(formData); | |
| jQuery(".afterSend").empty().html("sending..."); | |
| return true; | |
| } | |
| function showResponse(responseText, statusText, xhr, jQueryform) { | |
| jQuery(".afterSend").empty().html(responseText); | |
| } | |
| function error() { | |
| } | |
| jQuery('formthis').on('submit', function(e) { | |
| e.preventDefault(); | |
| jQuery(this).ajaxSubmit({ | |
| target: '.afterSend', | |
| crossDomain: false, | |
| beforeSubmit: showRequest, | |
| success: showResponse, | |
| error: error | |
| }); | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment