twitter-bootstrap Bootstrap Multiselect 插件过滤器大写

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23860689/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 20:47:47  来源:igfitidea点击:

Bootstrap Multiselect plugin filter uppercase

javascriptjquerytwitter-bootstrapmulti-select

提问by rapstar2004

I'm working on Bootstrap Multiselect, and I'm using bootstrap 3.1, and downloaded this script

我正在使用 Bootstrap Multiselect,我正在使用 Bootstrap 3.1,并下载了这个脚本

<script type="text/javascript">
    $(document).ready(function() {
        $('#example28').multiselect({
            includeSelectAllOption: true,
            enableFiltering: true,
            maxHeight: 150
        });
    });
</script>

<select id="example28" multiple="multiple">
  <option value="cheese">Ahmet Burak</option>
  <option value="tomatoes">Tomatoes</option>
  <option value="mozarella">Mozzarella</option>
  <option value="mushrooms">Mushrooms</option>
  <option value="pepperoni">Pepperoni</option>
  <option value="onions">Onions</option>
</select>

I tried many times to use filter. If I don't use first char uppercase in form, it doesn't find anything. How can I solve it?

我尝试了很多次使用过滤器。如果我不在表单中使用第一个字符大写,它不会找到任何东西。我该如何解决?

回答by Nitish Dhar

I understand that you are talking about lowercase not working when you try to filter the results in your dropdown. Just enable case insensitive filtering& it should work -

我知道当您尝试过滤下拉列表中的结果时,您说的是小写字母不起作用。只需启用不区分大小写的过滤,它应该可以工作 -

$(document).ready(function() {
    $('#example28').multiselect({
        includeSelectAllOption: true,
        enableFiltering: true,
        enableCaseInsensitiveFiltering: true,
        maxHeight: 150
    });
});

Working Example of your code- http://codepen.io/nitishdhar/pen/lHyas

您的代码的工作示例- http://codepen.io/nitishdhar/pen/lHyas