peol / jquery.imgloaded

Fake fork of Paul Irish's image loaded method for jQuery
48 stars 22 forks source link

Calls don't seem to happen once images are loaded in Chrome 8.0.552.215 #5

Open HammyNZ opened 13 years ago

HammyNZ commented 13 years ago

This doesn't seem to work in Chrome Chrome 8.0.552.215.

I tried using the following script


Basically nothing happens and any calls added after the bind do not fire off in Chrome.

This works fine in Firefox 3.6.12 and IE7/8

csnover commented 13 years ago

It’s true, this plugin code pretty much does not work. Sorry about that! You will just need to iterate through the images to see if they are already loaded yourself. (For what it is worth I don’t think your code does what you want, since assuming this plugin works properly, it will execute after the first image is done loading, not all images.)

peol commented 13 years ago

I have a pull request pending that might actually work a bit better. As csnover pointed out though, it won't fix your logical problem here.

adrienjoly commented 13 years ago

i'm experiencing the same problem while trying to get the image's dimensions after it's loaded. the dimensions are correct when images are downloaded by chrome the first time, but when i go back to the same page later, the dimensions provided in the load() handler are zeroes. probably because chrome fired the "load" event before updating the images' properties, when the images are retrieved from the cache. i'm considering using an interval in my handler, to wait until the dimensions are correct.