I’m using Autocomplete for a small set of values. I would like the “Autocomplete” source values to immediately display when the user focuses on a the input box (either using the keyboard or mouse), rather than waiting for them to type.
How can I get the source values to immediately display upon focus?
Thank You,
$("#cityInput").autocomplete({
minLength: 0, // With not that many cities, require at no characters before showing autocomplete
source: getJson(),
// plug-in to the select event in order to keep KnockOut informed about the
});
You can do this by calling “search” method of autocomplete on its “focus” event, check this JQFAQ.com topic which says how to do this. There are few other interesting FAQ related to autocomplecte, that may be helpful to you.