Answer the question
In order to leave comments, you need to log in
Loading images into the browser cache, how to do?
Hello!
How to implement image loading in the HD gallery, the fact is that there are about 60 pictures and they need to be loaded so that the user does not wait for a long time to load each one, but while admiring one, others are already loaded in the meantime.
There is a code:
img= new Array();
img[0]=new Image(); // каринка 1
img[1]=new Image(); // каринка 2
img[2]=new Image(); // каринка 3
img[0].src="путь"
img[1].src=""
img[2].src=""
var heroArray = [
'путь',
'путь',
'путь',
]
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question