TheCripZone SMF Themes Site
All Things Public => General Talk => Topic started by: 0413 on Apr 01, 12, 09:24:35 AM
Hey guys!
I have a question for you. How did you get that awesome live clock in your menu bar? I have been using a live clock for some time on your Actualism theme, but never could figure out how to get that in the menu bar. Looks so sleek and stylish. Thanks for all of your hard work!
Lee
hi,
just enter the J\script code within the Main_Menu it's self.
BACK UP & be careful..
<div id="clock_menu">
<font id="clock">Loading...</font>
<script type="text/javascript">//<![CDATA[
function refrClock()
{
var d=new Date();
var s=d.getSeconds();
var m=d.getMinutes();
var h=d.getHours();
var am_pm;
if (s<10) {s="0" + s}
if (m<10) {m="0" + m}
if (h>12) {h-=12;am_pm = "pm"}
else {am_pm="am"}
if (h<10) {h="0" + h}
document.getElementById("clock").innerHTML=h + ":" + m + ":" + s + am_pm;
setTimeout("refrClock()",1000);
}
refrClock();//]]></script>
</div>