View Full Version : IE7/IE8 not loading more then 3 image objects

07-13-2012, 10:17 PM
I'm making a jQuery plugin to do image zooming, and in it, to determine the true height of the element (regardless of css), I'm doing the following for each image:

var img = new Image();
img.onload = function () {
// Do stuff!
img.src = $oImg.attr('src');

Unfortunately, in the current test (with 35 items), its only going through 3, then not loading any more (I did a console.log in the onload and it only give me 3 of the ids).

Does anyone have any thoughts/advice on this one?

Old Pedant
07-13-2012, 10:31 PM
Can you show it live?

But I sure hope you don't mean you are doing it exactly that way, instead of using an array.

Old Pedant
07-13-2012, 10:34 PM
Oh, and I don't use jQuery, but I've done this kind of things for the last 6 years in creating slide shows, and it has worked with up to over 20 images, at least. And at the time I first did it, I was using MSIE 7. Maybe even started with IE 5, I think.

[I used it to start animations after all images were loaded...so I'd put an onload event on each new Image that simply went to a counter, and when the counter saw that all were loaded it started the animation.]

07-15-2012, 05:12 PM
Unfortunately, my new job does all dev work internally, so I can't put up the live project, but I will try to copy it over when I can get to the code on Monday.