Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@fengyuanchen/submitter
Advanced tools
A simple jQuery form submitting plugin.
dist/
├── submitter.js (7 KB)
└── submitter.min.js (4 KB)
Three quick start options are available:
git clone https://github.com/fengyuanchen/submitter.git
.npm install @fengyuanchen/submitter
.Include files:
<script src="/path/to/jquery.js"></script><!-- jQuery is required -->
<script src="/path/to/submitter.js"></script>
Initialize with $.fn.submitter
method.
$('form').submitter({
done: function (e, data) {
console.log(e.type); // 'done'
console.log(e.namespace); // 'submitter'
console.log(data); // Response data
}
});
// Set submitter options
$().submitter(options);
// Change the global default options
$.fn.submitter.setDefaults(options);
Note: jQuery.ajax's options are available too.
String
A string containing the URL to which the request is sent.
String
The HTTP method to use for the request (e.g. "POST", "GET").
Function
null
A shortcut of the "start.submitter" event.
Function
null
A shortcut of the "start.submitter" event.
Function
null
A shortcut of the "start.submitter" event.
Function
null
A shortcut of the "start.submitter" event.
Destroy the submitter.
$().submitter('destroy');
This event fires when the form is starting to submit.
This event is fired when the submit request succeeds.
This event is fired when the submit request fails.
This event is fired when the submit request finishes (after done
and fail
events are fired).
If you have to use other plugin with the same namespace, just call the $.fn.submitter.noConflict
method to revert to it.
<script src="other-plugin.js"></script>
<script src="submitter.js"></script>
<script>
$.fn.submitter.noConflict();
// Code that uses other plugin's "$().submitter" can follow here.
</script>
As a jQuery plugin, you also need to see the jQuery Browser Support.
Maintained under the Semantic Versioning guidelines.
FAQs
A simple jQuery form submitting plugin.
We found that @fengyuanchen/submitter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.