Created
July 9, 2015 11:29
-
-
Save probil/da0bf48429c94b0a2c8b to your computer and use it in GitHub Desktop.
Simple image preloader
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
/** | |
* Preload images | |
* | |
* @param {Array} images | |
*/ | |
window.preload_images = function (images) { | |
$(document).ready(function () { | |
$.each(images, function (index, image_url) { | |
var image = new Image(); | |
image.src = image_url; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment