jQuery .load method not firing on IE9

前端 未结 2 1071

I have 4 divs (class=mydiv), each with an image in, the load method fires on all other browsers I\'ve tested but it does not fire on IE9.0. I don\'t know if it works in any

2条回答
  •  感动是毒
    2020-12-12 06:04

    I had the same problem and solved using:

    if ($.browser.msie && parseInt($.browser.version) < 10) {
        window.onload = new function() {
            console.log('LOADED IE');
        }
    } else {
        $(window).load(function(){
            console.log('LOADED');
        })
    }
    

提交回复
热议问题