luis-almeida/unveil

How to check if all images are loaded

plisvb opened this issue · 1 comments

Is there a way to check if all images have been loaded?

I want to print the images on the page but I want to force a load of all the images first: Which is done with this: $("img").trigger("unveil");

But then I want to check that all images are loaded before initiating the print dialog.

You can count all images first and than icrease counter in unveil's load callback. If they match than all images are unveiled. You probably would need to apply some scope to count only images in your page section of interest.