Select drop-down box plug-in jquery. editable-select, jqueryselect drop-down box

Source: Internet
Author: User

Select drop-down box plug-in jquery. editable-select, jqueryselect drop-down box

There is a requirement in the project. You can select from the drop-down list or enter

Html code

1 <span> data source </span> 2 <select class = "source"> 3 <option value = "0"> manual import </option> 4 <option value =" 1 "> data service platform </option> 5 </select>

 

Js Code

1 $ ('# noMean '). editableSelect ({2 filter: false, 3 effects: 'fade ', 4 duration: 200, 5 onCreate: function () {6 console. log ("create from the drop-down list") 7}, 8 onShow: function () {9 console. log ("show in the drop-down box") 10}, 11 onHide: function () {12 console. log ("hidden from the drop-down list") 13}, 14 onSelect: function () {15 console. log ("drop-down box option selected") 16} 17 18}

 

 

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",The default value of "manual" is focus.

 

Method

OnCreate: WhenTriggered 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.