.width() of image returning 0 on load event

.width() of image returning 0 on load event

  1. var img_large = new Image();
  2. $(img_large).load(function () {
  3. $(".image_enlarge_container").append(this);
  4. alert($(img_large).width());

  5.                   //load of code
  6. }).error(function () {
  7.       // notify the user that the image could not be loaded
  8.     }).attr('src', large_src);
  9. }


In dreamweaver this works fine every time.
In IE 8 the width in the alert is always 0 (but the height seems to be ok??)
In chrome, it works fine once, but all other times after that (I have it so that the image is inserted into a dynamically created div on a mouseenter and removed on a mouseleave) the alert returns 0

Any insight as to what on earth is going on here would be greatly appreciated, thanks!