jQuery Plugin For Handling AJAX Form Submission - fajax
File Size: | 7.22 KB |
---|---|
Views Total: | 1573 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
fajax is a super small jQuery based AJAX form submission handler that allows you to send form data via XHR requests, with support for files and callback functions.
How to use it:
1. Put jQuery library and the jQuery fajax plugin at the bottom of the webpage, but before you close the body tag.
<script src="//code.jquery.com/jquery.min.js"></script> <script src="jquery.fajax.js"></script>
2. Just call the function fajax
on your existing html form and you're done.
$('form').fajax();
3. Callback functions.
$('form').fajax({ beforeSend: function(){}, success: function(){}, error: function(){}, complete: function(){}, });
4. You can also pass the jQuery $.ajax
's parameters to the plugin (url, type, data, processData and contentType are not supported).
Change log:
2017-01-24
- reset form on success
2017-01-16
- v1.1.3
2017-01-13
- add parameter resetOnComplete
2017-01-12
- fix variable name
2017-01-11
- remove unnecessary variable
2017-01-08
- reset form on submit
2017-01-07
- add default request method
This awesome jQuery plugin is developed by aziev. For more Advanced Usages, please check the demo page or visit the official website.