jQuery解決下拉框select設(shè)寬度時IE 6/7/8下option超出顯示不全
個人做了一些自定義的修改
復(fù)制代碼 代碼如下:
!--[if lt IE 9]
script type="text/javascript"
jQuery(function($){
var el;
$("select").each(function() {
el = $(this);
el.data("origWidth", el.css("width"));
// el.data("oriWidth",85);
})
.focusin(function(){
el=$(this);
el.css("width", "auto");
//if(el.width()el.data("oriWidth")){
// el.css("width", el.data("origWidth"));
//}
})
.bind("blur change ", function(){
el = $(this);
el.css("width", el.data("origWidth"));
});
});
/script
![endif]--
您可能感興趣的文章:jQuery獲取select選中的option的value值實現(xiàn)方法JQuery動態(tài)添加Select的Option元素實現(xiàn)方法JS & JQuery 動態(tài)添加 select optionjQuery操作Select的Option上下移動及移除添加等等JQuery中對Select的option項的添加、刪除、取值刪除select中所有option選項jquery代碼淺析jQuery對select操作小結(jié)(遍歷option,操作option)JQuery操作Select的Options的Bug(IE8兼容性視圖模式)jquery操作select option 的代碼小結(jié)jQuery動態(tài)產(chǎn)生select option下拉列表
相關(guān)經(jīng)驗推薦
- 基于IE下ul li 互相嵌套時的bug,排查,解決過程以及心得介紹
- IE7 float:right 右浮動時元素?fù)Q行錯位的bug解決方法
- 解決jquery的.animate函數(shù)在IE6下的問題
- IE6 注釋引起的文字溢出和浮動錯位的解決思路
- 被渲染成默認(rèn)色 使用濾鏡解決IE6下png圖片不能透明的問題
- IE6下不能設(shè)置height:1px的元素是什么原因如何解決
- IE6下focus與blur錯亂的解決方案
- expression CSS表達(dá)式解決IE6 position:fixed無效問題
- IE6瀏覽器下resize事件被執(zhí)行了多次解決方法
- 多出一行字 解決在IE6下文字溢出的解決方法小結(jié)
