On my page I have two divs... one div I'd like to be visible from 10am to 6pm ( server time ).... and the other div for the remaining hours.
I tried a bunch of searches to find some sort of a javascript or jquery content swapper without any luck.. thanks for any suggestions?
<div id="day">content</div>
<div id="night">content</div>
I was able to get this working using only the following php:
<?php
$hour = strftime("%H");
if ($hour >= 02 && $hour < 05)
{
echo '<div id="div1">content block one </div>';
}
else
{
echo '<div id="div2">content block two</div>';
}?>
However this solution doesn't seem to work if I want to show the div from 8pm until 4am... is this because it is spanning more than one day? Thanks for any suggestions.