jQuery UI Autocomplete: Triggering a Search From outside of autocomplete

后端 未结 1 1588
借酒劲吻你
借酒劲吻你 2021-01-04 02:04

I would like to trigger some jQuery autocomplete events from outside of autocomplete but I don\'t know how to. i.e.

$(\"something\").autocomplete({select:fun         


        
1条回答
  •  误落风尘
    2021-01-04 02:51

    Use the "Search" method: http://api.jqueryui.com/autocomplete/#method-search

    $("something").autocomplete(/* options */);
    $("somethingelse").click(function () {
        $("something").autocomplete('search', 'demo-value');
    });
    

    0 讨论(0)
提交回复
热议问题