I have been looking into Preloading images with JQuery and came across this Preloading images with jQuery
Now can someone tell me, do I have to call the preloaded i
You can preload all your images using this below:
function loadImages(){
var images = [
'http://cdn.yourdomain.com/img/image1.png',
'http://cdn.yourdomain.com/img/image2.jpg',
'http://cdn.yourdomain.com/img/image3.jpg',
'http://cdn.yourdomain.com/img/image4.jpg'
];
$(images).each(function() {
var image = $('
').attr('src', this);
});
}