jquery.html5loader icon indicating copy to clipboard operation
jquery.html5loader copied to clipboard

onComplete gets never called if some images are missing

Open yonailo opened this issue 6 years ago • 0 comments

Hello,

I try to preload 100 images, but when some images are missing, the onComplete() callback is never called.

Is this behavior normal ? I have added onMediaError but it seems that it is never called either.

As a result, the 'block-loader' DIV gets never removed.

I am using Chrome, this is my code :

$.html5Loader({
            filesToLoad: images,
            onComplete: function () {
              $('.block-loader').delay(1000).fadeOut(function() {
                $(this).remove();
              });
            },
            onUpdate: function(percentage){
               .....
            },         
            onMediaError: function(obj, elm) {
            	console.log(obj);
            }
});

yonailo avatar Dec 21 '17 16:12 yonailo