jQuery autoComplete view all on click?

后端 未结 22 2056
北恋
北恋 2020-12-02 09:52

I\'m using jQuery\'s autocomplete in a relatively simple way:

$(document).ready(function() {
  var data = [ {text: \"Choice 1\"}, 
               {text: \"Ch         


        
22条回答
  •  一生所求
    2020-12-02 10:16

    I solved this using attribute minChars:0 and after, trigger two clicks. (autocomplete shows after 1 click on input) my code

    
    
    function setAutocomplete(el){
        $(el).unbind().autocomplete("./index.php", {autoFill:false, minChars:0, matchContains:true, max:20});
        $(el).trigger("click");$(el).trigger("click");
    }
    

提交回复
热议问题