I'm looking for a good solution for an autocomplete/autosuggest jQuery plugin. The ones I have foun开发者_StackOverflowd stops auto-completing/suggesting after a value is selected. I'm trying to mimic Google Suggest.
For example, say I provide the following options:
- aaa
- bbb
- ccc
When user type in a
, the user should be presented with aaa
. If user selects that, then presses a space (meaning, user is getting ready to type some more), I want bbb
and ccc
still available to the user when he/she is typing.
Any suggestions for what I might be able to use?
(NOTE: Perhaps Google Suggest actually behaves the same way as the available plugins. Perhaps its list of options just contain every possible permutation of what the user might type.)
Yeah, I think your right about google having every possible permutation.
I would suggest keeping with the standard jquery autocomplete plugin (http://docs.jquery.com/Plugins/autocomplete).
You can try this one: nicolasbize.github.com/magicsuggest
You will get the desired behaviour with the following code:
new MagicSuggest({
focusOnExpand: true,
data: 'aaa,bbb,ccc',
renderTo: $('#your-div-id')
})
disclaimer: i am the author
精彩评论