开发者

Simple Gmail-like solution for jQuery string filter which highlights matched text

开发者 https://www.devze.com 2023-01-30 14:30 出处:网络
I need a simple string filter for a drop-down menu that highlights matched text. Here\'s an example of such a module in use in Gmail\'s UI:

I need a simple string filter for a drop-down menu that highlights matched text.

Here's an example of such a module in use in Gmail's UI:

Simple Gmail-like solution for jQuery string filter which highlights matched text

I'm assuming there's a plugin for 开发者_JAVA技巧something like this, though I'm also thinking it could be simple enough to roll my own. Any ideas?


Have a look into the jQuery UI AutoComplete widget: http://jqueryui.com/demos/autocomplete/


I managed to tweak this code a little to get something working that's very performant and really slick: http://kilianvalkhof.com/2010/javascript/how-to-build-a-fast-simple-list-filter-with-jquery/

Here's the final result already live on Goals:

Simple Gmail-like solution for jQuery string filter which highlights matched text

0

精彩评论

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