1
Selectize.js會扭曲我的引導元素(儘管在功能方面沒有問題)。具體來說,有兩個問題。Selectize.js導致Bootstrap select元素格式問題
- 組合框區域,等等,一倍,一部分比另一
- 選項區域較窄的是某種形式的透明!!!
HTML:
<div class="form-group">
<span style= "font-weight:bold" class="col-sm-1">Факт. адрес
</span>
<div class="col-sm-2">
<div class="sandbox">
<select id="fct_address_country_id" class="form-control input-sm" placeholder="Страна"">
</select>
</div>
</div>
....
</div>
JS
var initializeSelectize = function(id, selectize_type, maxItems) {
if (typeof(maxItems)==='undefined') maxItems = 1;
switch(selectize_type) {
case 1: // SINGLE_ELEMENT_EXTENTABLE
$select = $(document.getElementById(id)).selectize({
create: true,
maxOptions: MAX_OPTIONS});
break;
case 2: // SINGLE_ELEMENT_PREDEFINED
$select = $(document.getElementById(id)).selectize({
persist: false,
maxOptions: MAX_OPTIONS});
break;
case 3: // MULT_ELEMENT
$select = $(document.getElementById(id)).selectize({
maxItems: maxItems,
maxOptions: MAX_OPTIONS});
}
return $select[0].selectize;
}
vendorsFctAddressCountryId_selectize = initializeSelectize ('fct_address_country_id', selectize_type.SINGLE_ELEMENT_PREDEFINED);
只有另一個JQuery函數從數據庫填充組合框,但它顯然沒有任何與該問題有關的事情。