Currently I have:
$("#location").autocomplete({source: cities, minLength: 0, autoFocus: true});
The problem is that this plugin searches for matches anywhere inside the given inputs.
For example, if I enter “Bos” it suggests not only the words that start with “Bos”, but also the words that have “bos” in the middle.
How can I fix this?
Looks like you’ll have to use the callback setting for the
sourceoption:Untested: