I'm currently using a small jquery script to rotate through background images on a portfolio site I''m creating for a friend's portfolio site here's the code:
counter = 1;
num_images = 9;
dir = "IMAGE DIRECTORY URL";
function rotateHeader() {
var background_img = 'url(' + dir + '/image' + counter + '.gif)';
jQuery('.category').css('background-image', background_img);
counter++; if (counter > num_images) counter = 1;
}
setInterval( "rotateHeader()", 5000 );
You can see it working here:
www.iamanatom.com/site/the-good
What I want to do is have the images and or colors fade in and out. I think I'll have to preload the images to do this and then add some sort of fade property when the pictures are loading. How do I do this?