Maybe $('#pictures').html(...).children().bind(...)

But I think you're trying to hard to use jQuery. How about this
(tested on FF2/Mac):

var img = new Image();
img.onload = function() { img_width = this.width; img_height = this.height; };
img.src = '...';
$('#pictures').html(img);

Or if you want to not display the image until it is loaded, you could do:

var img = new Image();
img.onload = function() { img_width = this.width; img_height =
this.height; $('#pictures').html(this); };
img.src = '...';


--Erik

On 4/28/07, wyo <[EMAIL PROTECTED]> wrote:

On 28 Apr., 15:39, "Sean Catchpole" <[EMAIL PROTECTED]> wrote:
> Try this:
> $('#pictures').html(...).bind("load",function(){...});
>
I've tried

  $('#pictures').html('<img src=...>').bind ('load', sizeImage);

  function sizeImage() {
    alert ('sizeImage');
  }

The alert is never shown, see http://www.orpatec.ch/gallery4.html

O. Wyss


Reply via email to