live('load',...) doesn't work on images added dynamically to DOM
Hi,
I want to be able to execute some callback when images are being added to the DOM dynamically.
It's worth mentioning that the images are being brought into the DOM with ajax calls on a third party widget, so I can't hook up to any events of the ajax request/response, nor can I trigger an event on append() and such, because I'm not the one calling those.
I tried using $('img').live('load',function(){...}) for this, but it seems live doesn't catch the load event (other events, like mouse events, do work, so I'm guessing there's no error in the code). Is there any way to tweak it so it could catch a load event?
If not, maybe some other way to tell when an image has been added to the DOM in the manner I described?
Thanks,
Oren