Jquery autocomplete wildcard
I am using the jquery.ui.autocomplete
plugin, but I noticed when it searches, it uses a wild-card like this '%value%'
.
I am using the auto-complete for zip-codes, and I think it would make more sense of the wild-card worked like this 'value%'
so when you start typing it only filters out the items that 's开发者_运维技巧tart with' what you already typed.
I can't find any documentation on this though.
Anyone have any experience with this?
Much appreciated.
You can use a function as the source option for the autocomplete plugin which should allow you to get the behaviour you want.
There's a very similar question asked here: jQuery UI Autocomplete widget search configuration which has an excellent answer and working example.
精彩评论