...

View Full Version : jQuery Safari/Webkit calculating image dimensions too early


VIPStephan
07-16-2010, 01:22 AM
I’ve ran into this issue several times lately: I needed to calculate the dimensions of images and Webkit browsers like Safari and Chrome calculate the dimensions when the images aren’t yet loaded. I’ve tried to use the load() event but it only works if the images aren’t cached yet and still, it’s not 100% reliable. There is also some plugin that’s recommended in the jQuery documentation of load() but somehow it just returns a JS error (“too much recursion”). What’s the best way to prevent Webkit from calculating dimensions prematurely? I haven’t found anything successful on the internet yet.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum