twitter-bootstrap Bootstrap 中的多项选择
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17190447/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Multiple selection in Bootstrap typeahead
提问by Mujahid
I'm looking for a proper way to implement the jquery mobile filter list in bootstrap typeahead component.
我正在寻找一种在 bootstrap typeahead 组件中实现 jquery 移动过滤器列表的正确方法。
The functionality that I needed is here in the following link. Please scroll down to the bottom. http://jquerymobile.com/demos/1.2.1/docs/lists/lists-inset.html
我需要的功能在以下链接中。请向下滚动到底部。http://jquerymobile.com/demos/1.2.1/docs/lists/lists-inset.html
In the filtering list, I want to add checkboxes for each list items and the user should be able to check multiple value. They don't have to be added to the textfield. As that's the only function I need, its no use of adding the whole jquery mobile library to the project.
在过滤列表中,我想为每个列表项添加复选框,用户应该能够检查多个值。它们不必添加到文本字段中。因为这是我唯一需要的功能,所以没有将整个 jquery 移动库添加到项目中。
I found couple of options in the following link which goes near my requirement.
我在以下链接中找到了几个接近我要求的选项。
http://fusiongrokker.com/post/heavily-customizing-a-bootstrap-typeahead
http://fusiongrokker.com/post/heavily-customizing-a-bootstrap-typeahead
But, the multiple selection by clicking checkboxes didn't work with bootstrap typeahead.
但是,通过单击复选框进行的多项选择不适用于 bootstrap typeahead。
Can anyone give me a good solution for this.
谁能给我一个很好的解决方案。
Thanks
谢谢
回答by Aditya Kresna Permana
If you looking for bootstrap, this plugin can be used in your project
如果您正在寻找引导程序,则可以在您的项目中使用此插件
回答by cherry
I saw following has been suggested in many places:
我看到很多地方都提出了以下建议:
http://ivaynberg.github.io/select2/
http://ivaynberg.github.io/select2/
(If you use the multi-value version.)
(如果您使用多值版本。)

