selectize-enter-key-submit

1.0.1 • Public • Published

Selectize Enter Key Submit

Submit Selectize forms using the enter key.

Build Status

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)
  }
 
})

License

MIT © Wayne Ashley Berry

Package Sidebar

Install

npm i selectize-enter-key-submit

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • wayneashleyberry