Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-22-2009, 09:11 PM   PM User | #1
GOAT2G
New Coder

 
Join Date: May 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
GOAT2G is an unknown quantity at this point
Image preload and fade in problems

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:

Code:
$(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!
GOAT2G is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:09 AM.


Advertisement
Log in to turn off these ads.