开发者

Dynamic dropdown search box

开发者 https://www.devze.com 2022-12-21 23:45 出处:网络
开发者_开发问答Are there any gems that would help me make a search box like the one for tags on stackoverflow?
开发者_开发问答

Are there any gems that would help me make a search box like the one for tags on stackoverflow?

(Rails 2.3.5, required IE7 support and graceful no-script fall-back)

P.S.: Do these boxes annoy you or do you think it's a good thing to have one?


jQuery AutoComplete

The one for Google annoys me, but only because it moves the Google Search button, so when I click, I sometimes accidentally click one of the items in the AutoComplete list instead of the Search button. Very aggravating.


Indeed there is, its called auto_complete http://github.com/rails/auto_complete It used to be part of rails, but was extracted out into a plugin, checkout this screencast for more information http://railscasts.com/episodes/102-auto-complete-association


jQuery UFD is a good one for cases where you have a small number of options to search through, particularly if you want to be able to add new ones. It attaches to a select tag.

0

精彩评论

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

关注公众号