Dont forget preloader.

This commit is contained in:
Jason A. Donenfeld 2011-05-07 18:24:12 -04:00
parent 7c46d8b425
commit 4ccd66f378

View File

@ -0,0 +1,11 @@
(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)