jQuery AutoComplete Trigger Change Event

后端 未结 13 1101
陌清茗
陌清茗 2020-11-27 15:50

How do you trigger jQuery UI\'s AutoComplete change event handler programmatically?

Hookup

$(\"#CompanyList\").autocomplete({ 
    s         


        
13条回答
  •  盖世英雄少女心
    2020-11-27 16:29

    Another solution than the previous ones:

    //With trigger
    $("#CompanyList").trigger("keydown");
    
    //With the autocomplete API
    $("#CompanyList").autocomplete("search");
    

    jQuery UI Autocomplete API

    https://jsfiddle.net/mwneepop/

提交回复
热议问题