...

View Full Version : jQuery Image preload and fade in problems



GOAT2G
11-22-2009, 10:11 PM
Hi there,

Firstly, I'm very new to jQuery. I've have used a bit of code on a website I'm working on that preloads certain images and the fades them in. This works fine, BUT when I go BACK to a page I've already visited, the images just don't show up unless I do a refresh.

Here's the code I'm currently using:


$(document).ready(function() {
$('.galleryimages').hide()
.load(function () {
$(this).fadeIn("slow");
})
.attr('src', '01.jpg', '02.jpg', '03.jpg');
});

Could anyone offer a solution? I presume it's because the images are already in the cache when I visit for a second time, so preloading and the subsequent fadein does not occur.

I'd be really grateful of any help!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum