I know there is a lot of these on Stackoverflow but I haven\'t found one that works for me in a recent version of jquery (1.10.2).
I did try:
$(\".lazy
I would give the images that require this constraint a class like mustLoad
where:
and then create a generic image load handler function, such as:
$('img.mustLoad').on('load',function(){
/* Fire your image resize code here */
});
Edit:
In response to your comments about deprecating .load()
above, .load()
was deprecated, in favor of .on('load')
to reduce ambiguity between the onLoad
event and Ajax loading.