Images not loading on second visit
Having just dipped my toe in the jQuery pool, I've managed to create a preload and fadein for images on this portfolio site using this code:
-
$(document).ready(function() {
$('.landscapeimg').hide()
.load(function () {
$(this).fadeIn();
})
.attr('src', 'photo006.jpg', 'photo007.jpg', 'photo008.jpg');
});
However, when I view the page in Firefox something odd happens. Initially, the images load in fine with the desired effect. But when I click the logo (which links back to the same page), the images fail to load. I have to refresh for them to reappear. This is odd because I took the "display:none" style off to avoid this problem.
Here's the link:
http://sleepy.me.uk/noidtest/
Can anyone explain this problem? And remember, I'm a noob!
[Only the index page and statement pages are active at the moment]