I am using autocomplete of jquery (not jquery ui autocomplete. I am using it’s ancestor). Everything works fine except the autosuggest is only shown when you type something in textbox. My requirements are a bit different. By default I want to show all available suggestions to user. How can I do that?
This is the sample code:
$(document).ready(function() {
$("#CityAjax").autocomplete(
"autocomplete_ajax.cfm",
{
delay:10,
minChars:2,
matchSubset:1,
matchContains:1,
cacheLength:10,
onItemSelect:selectItem,
onFindValue:findValue,
formatItem:formatItem,
autoFill:true
}
);
});
Change minChars from 2 to 0. like this