duskosobic
4/29/2017 - 10:10 AM

Image Preloader Very easy way to preload images which are needed later (e.g. when a hover is performed)

Image Preloader

Very easy way to preload images which are needed later (e.g. when a hover is performed)

$.preloadImages = function() {
  for (var i = 0; i < arguments.length; i++) {
    $("<img />").attr("src", arguments[i]);
  }
};

$.preloadImages("hoverimage1.jpg","hoverimage2.jpg");