Posts Tagged ‘script’

Little tricks

Thursday, April 15th, 2010

After the starting this blog, I obviously had to update my website as this was really replacing the little news column I had.  So I thought I would give the whole site a minor overhaul.  I had a little trick at the bottom of the page where you could click and change the page background but the other images weren’t that good and didn’t really match the theme so I suddenly struck upon the idea of doing four seasonal images.  Then of course, my brain working the way it does, I suddenly thought, wouldn’t it be great if I could write a script to check for the month on the user’s computer and then change the background according to the season?  Well a few tears and frustrations later, I managed it.  If you don’t believe me you change the date on your computer and reload the page (you may have to close your browser if it has cached). I have mapped Spring to March, April and May; Summer to June, July and August;  Autumn (Fall) to September, October and November; and Winter to December, January and February.  Of course these only match if you are in the northern hemisphere.

I love little tricks like this and many of my websites have them, just something that makes it a little more fun or interactive.  Let me know if you would like something special for your website.