IE9 problems with jQuery load() event not firing

后端 未结 4 759
清酒与你
清酒与你 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:28

    Do not create a dynamic source as many suggest, all you have to do is apply the source after binding the load event like so...

    $("img").load(function() {alert("loaded!"}).attr("src", imgSource);

提交回复
热议问题