selectize-enter-key-submit
v1.0.1
Published
Submit Selectize forms using the enter key
Downloads
13
Maintainers
Readme
Selectize Enter Key Submit
Submit Selectize forms using the enter key.
This plugin will allow you to submit Selectize forms with the enter key. The
plugin triggers a submit
event which you can listen to and handle how you
will. The event will only be triggered if the input is empty.
Usage
$('input').selectize({
// load the plugin
plugins: ['enter_key_submit'],
// listen to submit events
onInitialize: function (foo) {
this.on('submit', function () {
this.$input.closest('form').submit()
}, this)
}
})