I try to use Jquery auto-complete. I have managed to do that but, if I type "a", auto-complete suggest all words that contain "a". But I want to see only those words that starts from "a". Is it possible to force the auto-complete to behave the way I want?
Asked
Active
Viewed 1,046 times
1
-
Are you using a remote data source? – polarblau Jan 10 '11 at 16:07
-
@polarblau, I am not sure that I understand you... The data (set of words and phrases that are used for auto complete) is loaded to the client side once (when the page is loaded). – Roman Jan 10 '11 at 17:07
-
Okay, then you're using a local data source and can't handle this with a server side scripting language. – polarblau Jan 10 '11 at 17:13
2 Answers
2
The brute-force way would be via a callback. That allows you to do the word matching yourself.

MSalters
- 173,980
- 10
- 155
- 350
-
-
$( ".selector" ).autocomplete({ search: function(event, ui) { ... } }); – dmackerman Jan 10 '11 at 16:16