I don't think even case 1 will work in all browsers. Some browsers won't
bother loading the image if it has display:none. But they will all load it
if it has visibility:hidden.
Here's how I do it:
jQuery.imageDimensions = function( src, callback ) {
jQuery('img /')
.css({
, November 19, 2009 9:39 AM
To: jquery-en@googlegroups.com
Subject: Re: [jQuery] Can't get image's dimension under a hidden object
I don't think even case 1 will work in all browsers. Some browsers won't
bother loading the image if it has display:none. But they will all load it
if it has
2 matches
Mail list logo