Dont forget preloader.
This commit is contained in:
parent
7c46d8b425
commit
4ccd66f378
11
web/js/002-preloadimages.js
Normal file
11
web/js/002-preloadimages.js
Normal 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)
|
Loading…
Reference in New Issue
Block a user