select drop down box plug in jquery. editable select details

  • 2021-07-13 04:11:30
  • OfStack

There is a requirement in the project. The drop-down box can be selected or filled in manually

html code

 <span> Data source </span>
 <select class="source">
 <option value="0"> Manual import </option>
 <option value="1"> Data service platform </option>

js code

 effects: 'fade',
 duration: 200,
 onCreate:function () {
 console.log(" Drop-down box creation ")
 onShow:function () {
 console.log(" Drop-down box display ")
 onHide:function () {
 console.log(" Drop-down box hidden ")
 onSelect:function () {
 console.log(" The drop-down box option is selected ")

Get a value


After using this plug-in, this one is an input, type= "text"


After selecting option for filter, whether to filter the default true

When effects is clicked, the transition effect of the drop-down box has three values: default, slide and fade. The default value is default

duration transition effect time is fast by default. The value can be fast and slow, or it can be a number

appendTo drop-down box This value will be used if the pop-up box effect is applied, showing where to load it

trigger drop-down box list how to trigger the value is "focus", "manual" default is focus


onCreate: Triggered when the editableSelect method takes effect.

onShow: Triggered when the drop-down box appears.

onHide: Triggered when the drop-down box is hidden.

onSelect: Triggered when the option in the drop-down box is selected.

Reference address: npm Installation Address Download address

Related articles: