I am currently using Jquery Lazy Load and I was wondering if there is a way of making a callback when all the images from my container ended loading (when lazy load has made all
In order to process on last image loaded and run code only and only when it's finished (all images loaded), you must use your handler function, as VAShhh told before, unlike the function call should only send 2 parameters, so this function is invoked with javascript call statement.
Then you will be able to successfully retrieve the "elements_left" parameter and compare it to 0 (zero): last loaded image left. Something like this:
function yourhandler(elements_left, settings) {
var imageNode, container;
if(elements_left === 0) {
// All images were loaded.
// Now do whatever you need with imageNode or its parents (container, etc) in order
// to run any other Plugin
imageNode = $(this);
container = settings.container;
alert('Ready to continue! Image node is $(this) and container settings.container');
}
}
Please check this example at: jsfiddle.net/eRyww/4