Select drop-down box plug-in jquery. editable-select details, jqueryselect drop-down box
There is a requirement in the project. You can select from the drop-down list or enter
Html code
<Span> data source </span> <select class = "source"> <option value = "0"> manual import </option> <option value = "1"> data service Platform </option> </select>
Js Code
$ ('# NoMean '). editableSelect ({filter: false, effects: 'fade ', duration: 200, onCreate: function () {console. log ("create from the drop-down list")}, onShow: function () {console. log ("show in the drop-down box")}, onHide: function () {console. log ("hidden from the drop-down list")}, onSelect: function () {console. log ("the drop-down box option is selected ")}}
Get value
$(".noMean").val()
With this plug-in, this is an input, type = "text"
Parameters
Whether to filter true by default after option is selected for filter
When you click effects, the transition effects of the drop-down box are default, slide, and fade. The default value is default.
The default duration transition effect time can be fast, slow, or numeric.
AppendTo drop-down box. If the pop-up box shows the effect, this value will be used to show where to load it.
The trigger drop-down list shows how the trigger value is "focus", and "manual" is focus by default.
Method
OnCreate: Triggered when the editableSelect method is activated.
OnShow: Triggered when the drop-down box appears.
OnHide: Triggered when the drop-down box is hidden.
OnSelect: Triggered when the options in the drop-down list are selected.
Reference address:
Https://www.npmjs.com/package/jquery-editable-select npm Installation
Http://indrimuska.github.io/jquery-editable-select/ demo address
Https://github.com/zhaobao1830/jquery-editable-select
The above is all the content of this article. I hope this article will help you in your study or work. I also hope to provide more support to the customer's home!