jquery分頁外掛程式jpaginate不相容ie的問題

來源:互聯網
上載者:User

下了個分頁外掛程式用,網上下載下來的demo在各ie版本下有點差別,但是還是可以用。

但是在我的頁面中則不能正常顯示。可能是因為div嵌套過多或者position定位造成的。

我改了下源碼基本可以在ie7,ie8,ie9正常顯示。以下是部分源碼。發現用別人的東西出了問題很難搞啊。關鍵是那個ie啊。

var bVer = navigator.appVersion;var ver ;if(bVer.indexOf('MSIE 7.0') > 0){ver = "ie7";}if(ver == 'ie7'){_ulwrapdiv.css('width',outsidewidth+72+'px');_divwrapright.css('left',outsidewidth_tmp+6+72+'px');}else{_ulwrapdiv.css('width',outsidewidth+'px');_divwrapright.css('left',outsidewidth_tmp+6+'px');}

 

修改後的代碼:

if(ver == 'ie7' || ver=='ie8' || ver=='ie9'){_ulwrapdiv.css('width',outsidewidth+72+'px');_ulwrapdiv.css('float','left');//這是添加的代碼_divwrapright.css('left',outsidewidth_tmp+6+72+'px');}

 

圖一:正常

圖二:在我的環境中

圖三:加上if(ver == 'ie8'){}後(我的環境是ie8)

圖四:加上 _ulwrapdiv.css('float','left'); //後,經測試在ie7,ie8,ie9都可以,只是有一點不對稱。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.