开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜