jquery img width() gives 0
<p>strange problem
do you know why this code:</p>

<pre><code>var img = new Image();
img.src = 'images/img1.jpg';

$(img).on('load', function() {
   alert($(this).width());

});
</code></pre>

<p>gives 0 in Firefox, Chrome but gives correct value in IE9?
How to get the proper value in all browsers?
using jQuery 1.8.2</p>
