IE9 problems with jQuery load() event not firing

后端 未结 4 742
清酒与你
清酒与你 2020-12-17 19:42

I am trying to preload a couple of images and would like my page to go on hold until all of the images are loaded. So what I am doing is this:

var numPics =          


        
4条回答
  •  时光取名叫无心
    2020-12-17 20:38

    +to the answer: Do not run this in firefox 3.6:

    img.attr("src", img.attr("src"));
    

    Some amount of images will not be loaded! I prefer:

    if($.browser.msie && parseInt($.browser.version, 10) >= 9) {
        img_load.attr("src", img_load.attr("src"));
    }
    

提交回复
热议问题