I am trying to do this but keep on failing.
I have a text box. I have also an array of cities, and i want, while typing to display the cities that the user should be 开发者_运维知识库able to select.
Like if the user is typing : Mu the drop down should display Mumbai \n MuMu ... etc Like the Tags below is doing !
Does someone have any ideas in how this can be accomplished ?
There are quite a lot different JQuery plugins for this purpose:
- http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
- http://code.google.com/p/jquery-autocomplete/
- http://www.pengoworks.com/workshop/jquery/autocomplete.htm
Jquery autocomplete is one of the best for you
http://docs.jquery.com/Plugins/Autocomplete#source
http://docs.jquery.com/Plugins/Autocomplete#demo
This function is part of the new version of Jquery You don't need any extra plugin to use it:
http://jqueryui.com/autocomplete/
精彩评论