1.0.1 • Published 7 years ago

selectize-enter-key-submit v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

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