Announcement

Collapse
No announcement yet.

Digital Clock

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Digital Clock

    Click image for larger version

Name:	clock.png
Views:	279
Size:	4.9 KB
ID:	3804

    Display a digital clock like this anywhere that you can place static html module code to use is
    Code:
    <style>
    <!--
    .styling{
    [COLOR=#FF0000]color:red;[/COLOR]
    font: bold 18px MS Sans Serif;
    padding: 3px;
    }
    -->
    </style>
    <span id="digitalclock" class="styling"></span>
    
    <script>
    <!--
    
    /*****************************************
    * LCD Clock script- by Javascriptkit.com
    * Featured on/available at http://www.dynamicdrive.com/
    * This notice must stay intact for use
    *****************************************/
    
    var alternate=0
    
    function show(){
    var clockobj=document.getElementById? document.getElementById("digitalclock") : document.all.digitalclock
    var Digital=new Date()
    var hours=Digital.getHours()
    var minutes=Digital.getMinutes()
    var dn="AM"
    
    if (hours==12) dn="PM"
    if (hours>12){
    dn="PM"
    hours=hours-12
    }
    if (hours==0) hours=12
    if (hours.toString().length==1)
    hours="0"+hours
    if (minutes<=9)
    minutes="0"+minutes
    
    if (alternate==0)
    clockobj.innerHTML=hours+"<font color='lime'> : </font>"+minutes+" "+"<sup>"+dn+"</sup>"
    else
    clockobj.innerHTML=hours+"<font color='black'> : </font>"+minutes+" "+"<sup>"+dn+"</sup>"
    alternate=(alternate==0)? 1 : 0
    setTimeout("show()",1000)
    }
    window.onload=show
    
    //-->
    </script>
    Just edit the red highlight to what ever colour you want, The little pic has it placed in the header using sitebuilder/header ad html module
    Wise men say nothing Fools never listen

    #2
    Moved to the appropriate channel. This is not a Javascript hack. Javascript Hacks channel is for mods that require editing of default vB5 Javascript files.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment

    Users Viewing This Page

    Collapse

    There is 1 user viewing this forum topic.

    • Guest Guest

    Latest Posts

    Collapse

    Working...
    X
    Searching...Please wait.
    An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

    Please push the back button and reload the previous window.'
    An unexpected error was returned: 'Your submission could not be processed because the token has expired.

    Please push the back button and reload the previous window.'
    An internal error has occurred and the module cannot be displayed.
    There are no results that meet this criteria.
    Search Result for "|||"