how do I "ajaxify" my php code?
- by dot
I have divs that I want to display at specific times throughout the day. I have it working in PHP, but it requires refreshing the browser manually. I would like my script to automatically load the right div when the time is right.
Am I on the right track? Perhaps there is a jquery plugin for this sort of thing that would handle the refreshing?
Any help is greatly appreciated... Thanks!
<?php
$time = date("H\:i");
if (($time > "16:59") && ($time < "18:59")) {
echo "<div>1</div>";
}
elseif (($time > "18:59") && ($time < "20:59")) {
echo "<div>2</div>";
}
elseif (($time > "20:59") && ($time < "22:59")) {
echo "<div>3</div>";
}
else {
echo "<div id='out'><p>Outside the specified point in time.</p></div>";
}
?>