Last active
February 3, 2018 03:04
-
-
Save davidsword/765532bd4b0bf81b74c9c81060a01fa5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const preLoadImages = ["image1.jpg","image2.png"]; | |
preLoadImages.forEach(function(image, index){ | |
setTimeout(function(){ | |
$("<img />").attr("src", image); | |
}, 1000*index); // every second load 1 | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment