Full Page Background Transition
# October 11, 2012 at 6:42 am
I have created this website for a friend, and he seems happy enough with it, however is a bit unsure with the background transition effect.
The thing he doesn’t like about it is the transition from one image to the next, the bit where the white space appears as the code is grabbing the next image.
On the homepage, I have made a custom template as it is a static page and only needs the sidebar.php file.
On this template I have added the line;
And the jQuery looks like this;
var aImages = new Array();
var iPrev = -1;
var iRnd = -1;
aImages = “wp-content/themes/SJPhotographyTheme/images/MSF-photo-home.jpg”;
aImages = “wp-content/themes/SJPhotographyTheme/images/queen-peekabo.jpg”;
aImages = “wp-content/themes/SJPhotographyTheme/images/sistine-chapel.jpg”;
aImages = “wp-content/themes/SJPhotographyTheme/images/titanic-photo-home.jpg”;
aImages = “wp-content/themes/SJPhotographyTheme/images/colosseum-rome.jpg”;
aImages = “wp-content/themes/SJPhotographyTheme/images/kitchen-photo-home.jpg”;
/* Define the function that triggers to fade in the background as soon as the image has loaded */
/* Fade in during 2 seconds */
/* Set the timeout to fade out the image after 10 seconds*/
/* Load the next image after 4 seconds */
/* Start the slideshow one second after the page is ready */
/* Assign the new image to the background */
/* Select a random image number and make sure this is not equal to the previous image */
while(iPrev == iRnd)
iRnd = Math.floor(Math.random()*aImages.length);
/* Show the selected image */
iPrev = iRnd;
Is there ANY way possible to cross fade these images? I have tried looking for a plugin on WordPress for this type of thing but none seem to work :(
Any help would be appreciated.
You must be logged in to reply to this topic.