minChars in autocomplete() not working
I am doing demo for autocomplete using jquery plugin. I have to set the minimum character lengt开发者_StackOverflow社区h to 3. I have changed minChars : 3 in its default options values.
$.Autocompleter.defaults = {
inputClass: "ac_input",
resultsClass: "ac_results",
loadingClass: "ac_loading",
minChars: 3,
delay: 400,
matchCase: false,
matchSubset: true,
matchContains: false,
cacheLength: 10,
max: 100,
Also I tried it by changing adding the minChar parameter on autocomplete() call like:
$("#inputSchool").autocomplete(data, "option", "minChars", 3);
and also like :
$("#inputSchool").autocomplete(data, "{minChar : 3}");
But yet is is not working. Please tell me the solution.
And How to Edit the format of autocomplete list? i.e. I have to add multiple values html like :
<ul>
<li>value1, value2
<br />
value3
</li>
</ul>
Please Help me?
Are you searching something like :
$( ".selector" ).autocomplete({ minLength: 3 }); // Not minChars
//or
$("#inputSchool").autocomplete("option", "minLength", 3);
Try:
$("#inputSchool").autocomplete(data, {minChars : 3});
精彩评论