Skip to content

Instantly share code, notes, and snippets.

@pavosdijital
pavosdijital / preload-images.js
Created Mar 3, 2021 — forked from gyrus/preload-images.js
WordPress image preloading
View preload-images.js
/**
* Image preloader
*
* @link http://engineeredweb.com/blog/09/12/preloading-images-jquery-and-javascript
*/
var cache = [];
// Arguments are image paths relative to the current page.
function pilau_preload_images() {
var args_len, i, cache_image;
args_len = arguments.length;