I have a script that does images resizing on load:
$( document ).ready( function() {
$( '.image' ).load( function() {
// $(this).happens
} );
} );
this seems to work fairly well with pages.
Now I am using ajax to get HTML elements, some of which might contains images that needs resizing, with the class "image". But the above snippet (when in the body of the ajax html) does not fire. Is there anyway to add this event somehow? I've tried ready(), but it fires before I can get the width/height. thanks
I also tried:
$( '.image' ).on( 'load', function() {
// $(this).happens
} );