Home › Forums › JavaScript › Jquery preload images › Re: Jquery preload images
March 22, 2013 at 6:56 pm
#129408
Participant
Put the code inside your document ready function
$(document).ready(function(){
var preloads = [
‘/wp-content/upl/images/logo.png’,
‘/wp-content/upl/images/logo2.png’,
‘/wp-content/upl/images/logo4.png’
];
$(preloads).each(function(){
$(‘‘)[0].src = this;
});
//rest of your code here..
});