Home › Forums › JavaScript › Jquery preload images › Re: Jquery preload images
March 22, 2013 at 9:24 am
#129349
Participant
Thank you.
Should i use it on some other way, or just to put this in top ? I don’t understand the logic of this.
Or i must use preloads[0] or 1 etc… in my code path to image ?
Podders
Permalink to comment # 2:29AM
Flag
Add the following code to your documen.ready,
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;
});