Skip to content

Instantly share code, notes, and snippets.

@callblueday
Created August 23, 2013 13:03
Show Gist options
  • Save callblueday/6319119 to your computer and use it in GitHub Desktop.
Save callblueday/6319119 to your computer and use it in GitHub Desktop.
function preLoadImgs() {
var imgsUrl = [
'../qhome/img/progress_1.png','../qhome/img/progress_1_1.png',
'../qhome/img/progress_2.png','../qhome/img/progress_3.png',
'../qhome/img/progress_4.png'
];
for(var i in imgsUrl) {
preLoadImg(imgsUrl[i]);
}
}
function preLoadImg(url) {
var img = new Image();
img.src = url;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment