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
/* | |
* Only the alert from the beforeSubmit callback is fired off. | |
* The reason I need to do this is so other $.ajax calls (not using the ajaxForm plugin) will also use the success callback | |
* I suppose if I use $(document).ajaxSuccess() it would work, but that's not the point. | |
* If you were to extend $.ajaxSettings on line 65 of your most recent version (2.68) it will work properly. | |
*/ | |
$(function() { | |
$.ajaxSetup({ | |
success: function() { | |
alert('Fire off Success callback for all Ajax Requests'); | |
} | |
}); | |
$('form').ajaxForm({ | |
beforeSubmit: function() { | |
alert('Fire off ajaxForms beforeSubmit callback'); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment