Load Images Before Application Start | Sololearn: Learn to code for FREE!

+2

Load Images Before Application Start

I have multiple images to be loaded and I want to load them all before displaying them. How can i do that with JS.

4/7/2019 10:23:29 AM

Alquen

2 Answers

New Answer

+6

Count in load event listener of images, and call the callback function when counter reaches total number of images. https://code.sololearn.com/Wugdyk32iG41/?ref=app

0

@Gordon Big thanks man