Minimal jQuery AJAX Form Submission Plugin - Gdtsubscription
| File Size: | 4.36 KB |
|---|---|
| Views Total: | 462 |
| Last Update: | |
| Publish Date: | |
| Official Website: | Go to website |
| License: | MIT |
Gdtsubscription is an ultra-light jQuery plugin used for for handling AJAX-based form submissions with custom actions, methods, styles and feedback messages.
See also:
- Simple ajax form Submission Plugin with jQuery - Submitter
- jQuery Plugin For Submitting A form with ajax - formSubmit
How to use it:
1. Place jQuery library and the jQuery Gdtsubscription plugin at the bottom of your html page.
<script src="//code.jquery.com/jquery.min.js"></script> <script src="jquery.gdtsubscription.js"></script>
2. Create a DIV container to place the feedback (error, success, sending) messages.
<div id="messaging"></div>
3. Call the function on the form element and customize the feedback messages.
$('form').gdtsubscription({
target: '#messaging',
errorMsg: 'Error message here...',
successMsg: 'Success message here...'
});
4. Call the function on the form element and customize the feedback messages.
$('form').gdtsubscription({
target: '#messaging',
errorMsg: 'Error message here...',
successMsg: 'Success message here...'
});
5. Default CSS classes for the AJAX form.
$('form').gdtsubscription({
error: 'error',
sending: 'sending',
success: 'success',
});
6. Override the form's action and send method in the JavaScript.
$('form').gdtsubscription({
action: $(this).attr('action'),
method: $(this).attr('method'), // GET,POST
});
7. You can also specify the data you want to send to the sever via AJAX.
$('form').gdtsubscription({
data: ''
});
This awesome jQuery plugin is developed by Panchesco. For more Advanced Usages, please check the demo page or visit the official website.











