开发者

Looking for Autocompletion field to replace select menu

I am looking to replace my select menu for my products inside of my form and wanted to know if anyone c开发者_高级运维an list choices or alternatives.

This is my select menu:

<%= select("price", "product_id", Product.all.collect {|p| [ p.name, p.id ]) %>

I want an autocomplete field to replace it instead. These are the choices so far:

Chosen

Jquery TokenInput

OK, so far we have two, anymore?

Thanks.


If you're looking for a client-side solution, Chosen is a very good jQuery plugin. It'll transform any select field into an drop-down with autocomplete.

Note that Chosen is actually disabled on iPhone, iPod Touch, and Android mobile devices, so if your site needs to support mobile, Chosen is not a valid option.


I believe this plugin should more than cover your needs.

https://github.com/crowdint/rails3-jquery-autocomplete

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜