Hi,
Basically, what I have is 4 or so .php pages, each with the #container div set to a different colour. As I click on each link in the navigation and the new page loads, I want the background to fade in from whatever the previous colour was before. Eg. the background is blue, a new page is clicked, and it fades from blue to red. Not the nicest choices of colours but I'm just testing.
So far I have something like the below and although it fades the background colour, it fades it in from white, as it doesn't know what the previous colour was. I'm using jQuery 1.4 and the jQuery color plugin to animate the fade in.
$(document).ready(function() {
$("body.pageOne #container").animate( { backgroundColor: 'blue' }, 2000).delay(5000);
$("body.pageTwo #container").animate( { backgroundColor: 'red' }, 2000).delay(5000);
});
Thanks for your help!