Tools used for this tutorial
jQuery 3.7.1
Sometimes it is very important to preload all the images so that the user will not wait when he makes an action which requires an image to be displayed.
function PreloadImages(Images) {
$(Images).each(function(){
$('<img/>')[0].src = this;
});
}
PreloadImages([
'/images/FirstImage.png',
'/images/SecondImage.png',
'/images/ThirdImage.png'
]);