I am creating a jQuery plugin.
How do I get the real image width and height with Javascript in Safari?
The following works with Firefox 3, IE7 and Opera 9:>
If the image is already used, you sholud:
set image simensions to initial
image.css('width', 'initial'); image.css('height', 'initial');
get dimensions
var originalWidth = $(this).width(); var originalHeight = $(this).height();