Create a gist now

Instantly share code, notes, and snippets.

@davidsword /preloadimages.js Secret
Last active Feb 15, 2017

What would you like to do?
const preLoadImages = ["image1.jpg","image2.png"];
preLoadImages.forEach(function(image, index){
$("<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