2016-12-01 146 views
0

是否有一種方法來改變爲「選擇2項」「2機組選擇」選擇引導選擇(西爾維奧Moreto)文本顯示

在自舉-select.js有

如下:

<script> 

Selectpicker.DEFAULTS = { 
noneSelectedText: 'Special Invite', 
noneResultsText: 'No results matched {0}', 
countSelectedText: function (numSelected, numTotal) { 
    return (numSelected == 1) ? "{0} crew selected" : "{0} crew selected"; 
} 


(function ($) { 
$.fn.selectpicker.defaults = { 
noneSelectedText: 'Special Invite', 
noneResultsText: 'No results match {0}', 
countSelectedText: function (numSelected, numTotal) { 
    return (numSelected == 1) ? "{0} crew selected" : "{0} crew selected"; 
}, 
maxOptionsText: function (numAll, numGroup) { 
    return [ 
    (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)', 
    (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)' 
    ]; 
}, 
selectAllText: 'Select All', 
deselectAllText: 'Deselect All', 
multipleSeparator: ', ' 
}; 
})(jQuery); 

</script> 

兩個問題:

1)我發現了一個意外的標記; (jQuery)之後;

2)如果我把這些腳本中的標籤將它覆蓋引導版本?

回答

0

只需要刪除

Selectpicker.DEFAULTS = { 
noneSelectedText: 'Special Invite', 
noneResultsText: 'No results matched {0}', 
countSelectedText: function (numSelected, numTotal) { 
return (numSelected == 1) ? "{0} crew selected" : "{0} crew selected"; 
} 

和腳本的作品。