I currently call a function when lazyload has rendered an image. This works fine. The problem I have is that i need to access $(this)
within the function. Is there a way of parsing this data to the function?
Fiddle http://jsfiddle.net/DTcHh/19852/
$("img").lazyload({
load: equalizeHeights
});
function equalizeHeights()
{
//var classStr = '.'+$(this).parent('div').attr('class');
var classStr = '.my-wrapper';
var heights = $(classStr).map(function() {
return $(this).height();
}).get(),
maxHeight = Math.max.apply(null, heights);
$('.my-wrapper').height(maxHeight);
}