BootStrap插件,組件使用注意事項

1.select2(data-live-search="true"可輸入屬性):

控件

<select class="form-control combox"   data-live-search="true" multiple>

<option></option>

</select>

在modal中使用select2無法輸入;

解決方法【加上以下代碼】:

$.fn.modal.Constructor.prototype.enforceFocus = function() {};

2.點擊頁面空白處modal消失;

解決方法【加入以下代碼】:

jQuery.browser = {};
(function () {
jQuery.browser.msie = false;
jQuery.browser.version = 0;
if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
            jQuery.browser.msie = true;
            jQuery.browser.version = RegExp.$1;
 }
})(); 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章