const imgLoad = imagesloaded('#event-galleries-page', { background: true });
imgLoad.on('always', ( instance ) => {
console.log('all images loaded');
});
imgLoad.on('done', ( instance ) => {
console.log('all images successfully loaded');
});
imgLoad.on('fail', ( ) => {
console.log('all images loaded, at least one is broken');
});
imgLoad.on('progress', ( instance, image ) => {
const result = image.isLoaded ? 'loaded' : 'broken';
console.log( 'image is ' + result + ' for ' + image.img.src );
});
From the above HTML code, when the broken JPG exists, the "always" event is not fired which is correct.
However when I took out it so that only all CSS background images are used, but only one CSS BG is broken, the fail event was not fired.
Hi this is a great library however I have some problems with version 5.0.0:
From the above HTML code, when the broken JPG exists, the "always" event is not fired which is correct. However when I took out it so that only all CSS background images are used, but only one CSS BG is broken, the fail event was not fired.
And the progress event never got fired.
Hope someone can help.
Thanks.