Timed Graphic
- Started
- Last post
- 4 Responses
- tparsons
I'm trying to get an evening shot to show up as a background on a site and to show from 6PM - 6AM based on the persons clock on their local computer. From 6AM - 6PM I would switch it out to a day shot.
Has anyone seen a snippet of code that could handle this? I know it could be done in Flash but I'm trying to avoid that.
Thanks for the help.
- jamble0
Could try these:
http://www.jek2k.com/wp/index.ph…
http://blog.taprootcreative.com/…Got a few results on google looking for php time based stylesheets, might be more than those two if they're not right?
- FallowDeer0
<!--
today = new Date();
hours = today.getHours();if ((hours >= 20)||(hours <= 7))
{
document.write('<link href="style2.css" rel="stylesheet" type="text/css" />');
}else
{
document.write('<link href="style.css" rel="stylesheet" type="text/css" />');
}
//-->