photofloat/web/js/002-preloadimages.js

11 lines
261 B
JavaScript
Raw Normal View History

2011-05-08 00:24:12 +02:00
(function($) {
var cache = [];
$.preloadImages = function() {
var args_len = arguments.length;
for (var i = args_len; i--;) {
var cacheImage = document.createElement('img');
cacheImage.src = arguments[i];
cache.push(cacheImage);
}
}
})(jQuery)