Seungweon's Blog

in Portland, Oregon

I've been working on a script to rotate background images, or even any other properties of elements of your blog on every page loading. Here I assume that ".top" has a background image of banner for the blog.

Only you can do is that upload insert following line before "</head>" at "Edit HTML" of Layout. However, you need to have this *.js in web hosting.

≶script src="'http://web.cecs.pdx.edu/~swpark/dailybanner.js'" type="'text/javascript'/">


If you are able to edit and host the JavaScript file yourself, you can use this as a basis for further customization including:

  • different background images
  • different color schemes
  • background color for a different section of your blog
Below is the banner.js for changing the images of .top section.

var ms,h;
Today = new Date();
ms = Today.getMilliseconds();
h = ms % 5;
//
switch (h) {
case 0:document.write('<style type="text/css">.top {background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgasGtnxOfksDATS-EOMxdsqlEEUt35D3LZGNeXUXaNwIN96_sfnOHm0gdLawH7CtacbVHd3rRR_Qj5MwbE0LLNJaMXWcB1jNCrpJxOMgAocJ99Y5hRHVmgV4hpZxpUSb82Q8MYBVz4QNY/s1600/yaquinaheadlighthouse.jpg)}"></style>')
break;
case 1:document.write('<style type="text/css">.top {background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZkoKrKDcSMSi4gj8oV-QaYQgCv9faGCJtZ96QGsXSClAr_TF_xK-Ba2T_tfUJyp4o7IGOtgjHoJxP-40f_zAE5EfNGSTJOJPbmhKNWz08VaioOLCtWFghIJLSQAOxeKPz3g4lL35yfAY/s1600/pacificcity.jpg)}"></style>')
break;
case 2:document.write('<style type="text/css">.top {background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr1yCv6ZdeZYOM0GlE4e3eSe6NcgNHAL0DR9GRUQXKFgDoEXe6ffz_dJqhLzakwygV2EmurQrKyt6vRPrSadj2Sp3S8ePSpvj-VXsOEmr8cMZQyMJqNa3S5SJIJNWT8nkwsL-8T-d8AIc/s1600/multnomahfalls.jpg)}"></style>')
break;
case 3:document.write('<style type="text/css">.top {background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP1jfUhQVDeD5aiwWkrTvwag_IpvjhJKI6o09pYiLJyZxQYV9d9upxlHbNf-k1R1Ne95RdTl1mpioCNv63xsuegz6gW68yQnjN7PaNpW1iyZDUTFGOig-ka7RJ15KdiyN0yr8_hRrAeRs/s1600/elevation.jpg)}"></style>')
break;
case 4:document.write('<style type="text/css">.top {background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeMsS64hf1nyHX-AihlIv43o6iVD1vN0G4w_1-g8WReUXuKWY00-QLfOcwbHFGyqqXJ5cCjxB0otuMsLLN9w_qKlEJqycoOHloWsUoLyCW6TNX6t_Kj65KLF-xPhyphenhyphenVJb-EL0TmfkDm2_4/s1600/cannonbeach1.jpg)}"></style>')
break;
default:document.write('<style type="text/css">.top {background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGtsA50xjoD3eu3OTON4ZQLDGIAjKDW2d1JpK4y34yLYRJmvnG5zd5rkszxE4e45wPCgDvlExtwqia-YujUhMJ0ig7qOHSKCKQbOkLJEHhu2b8dYIUa8FkC0x79_-ItgmWj65PrwAfqBw/s1600/blazer.jpg)}"></style>')
break;
}

Source: http://www.bloggerbuster.com/2008/04/change-your-blog-background-according.html

Good Luck!!