1

我正在使用 Jquery Multiselect 插件来归档我的选择下拉列表。这个插件工作正常,除了一件事是,当我在过滤器框中输入一些东西时,什么都没有显示意味着我的输入词没有显示。但是当我从我的文件中删除bootstrap.min.css时,它正在工作并且我的类型字正在显示。我认为多选过滤器插件的Jquery UI正在使用与 bootstrap.min.css 冲突,但我无法弄清楚。请帮帮我。下面是我的代码,并检查屏幕截图

在此处输入图像描述

HTML

<link rel="stylesheet" type="text/css" href="jquery.multiselect_1.css" />
<link rel="stylesheet" type="text/css" href="jquery.multiselect.filter.css" />
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" />
<link rel="stylesheet" href="bootstrap.min.css" />

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<script type="text/javascript" src="jquery.multiselect_1.js"></script>
<script type="text/javascript" src="jquery.multiselect.filter.js"></script>

<select name="industry" id="industry" class="industry" style="width:305px;" onchange="configureDropDownLists(this,document.getElementById('product_type'));" required>
    <option value="" disabled="disabled" selected>Choose Industry*</option>
    <option value="Agriculture & Food">Agriculture & Food</option>
    <option value="Apparel, Textiles & Accessories">Apparel, Textiles & Accessories</option>
    <option value="Auto & Tranportation">Auto & Tranportation</option>
    <option value="Bags, Shoes & Accessories">Bags, Shoes & Accessories</option>
  </select>

<select name="product_type" id="product_type" style="width:305px;">

    </select>

Javascript

jQuery("#product_type").multiselect({
                minWidth: 360, multiple: false,
                selectedList: 1
            }).multiselectfilter({width:250});

function configureDropDownLists(ddl1,ddl2) {


    var AgricultureFood = ['Agricultural Growing Media', 'Agricultural Waste', 'Animal Products', 'Beans'];
    var ApparelTextilesAccessories = ['Apparel Design Services', 'Apparel Processing Services', 'Apparel Stock'];

    switch (ddl1.value) {
        case 'Agriculture & Food':
            ddl2.options.length = 0;
            for (i = 0; i < AgricultureFood.length; i++) {
                createOption(ddl2, AgricultureFood[i], AgricultureFood[i]);
            }
            break;
        case 'Apparel, Textiles & Accessories':
            ddl2.options.length = 0; 
        for (i = 0; i < ApparelTextilesAccessories.length; i++) {
            createOption(ddl2, ApparelTextilesAccessories[i], ApparelTextilesAccessories[i]);
            }
            break;

            default:
                ddl2.options.length = 0;
            break;
    }
     jQuery('#product_type').multiselect('refresh');

}

    function createOption(ddl, text, value) {
        var opt = document.createElement('option');
        opt.value = value;
        opt.text = text;
        ddl.options.add(opt);

    }

提前致谢。

4

1 回答 1

0

尝试添加z-index#product_type

#product_type{z-index:99999999;}
于 2016-01-19T10:54:43.007 回答