Doodle 336 – jQuery Word Clock finished

Doodle 336 - Word Clock finished

So this was the final version of the clock when I decided I was happy with it.  You can check it out here.  The one thing I still want to add it for it to auto-size the text to as big as possible for your browser window without overflowing.  Someday I’ll figure it out I suppose.

I was up until 2 a.m. because when it was almost done, the first time, I decided that I wasn’t tracking the states as well as I should, so I basically started all over.

Tags: , ,

9 Responses to “Doodle 336 – jQuery Word Clock finished”

  1. Gary Says:

    Do you have any plans to make the world clock a screensaver? It’s awesome!!!

  2. Essam Says:

    can we have it?? like download it please :)

  3. m0l0ch Says:

    Nice clock, any chance of a download link to source?

    • vonholdt Says:

      thanks! there’s a link in the post or just go here. you should be able to “view source” in your browser or just “save page as” there’s really no hidden code, it’s all right there.

  4. Mike Says:

    Hi there

    I found a problem, when its 12:30pm the clock doesnt show anything.
    I have added this line at the beginning of the hours:
    twelve
    and at the end:
    twelve
    the problem its showing twice the twelve text, its actually working with that line
    you also can replace “if ( hour < 12 ) {" for "if ( hour <= 12 ) {"

    • vonholdt Says:

      you’re right, i’ll look at the code later tonight and get that fixed… if i can still log in there. i haven’t used that ISP for some time now. they’re just nice enough to unknowingly keep hosting my stuff. thanks for the bug!

  5. Mike Says:

    Hi there

    Delete my old comment, I read well the code and figured it out what to do.

    When is its 12:30am the script shows twelve am, but when its 12:30pm the script doesnt show the “twelve” text and only shows the “pm” text.

    To get it work only find the line for hours // Hours: in line 137 and replace for this:

    // Hours:
    if ( oldsplit[3] != nowsplit[3] ) {
    var hour = nowsplit[3];
    $(“#hours *.lit”).removeClass(“lit”).addClass(“off”);
    if ( hour < 12 ) {
    if ( $("#ham").is('.lit') ) { } else { $("#ham").addClass("on"); };
    if ( $("#hpm").is('.lit') ) { $("#hpm").removeClass("lit").addClass("off"); };
    if ( hour == 0 ) { var hour = 12; };
    var which = "#h"+hour;
    $(which).addClass("on");
    }else {
    if ( $("#hpm").is('.lit') ) { } else { $("#hpm").addClass("on"); };
    if ( $("#ham").is('.lit') ) { $("#ham").removeClass("lit").addClass("off"); };
    if ( hour == 12 ) { var hour = 24; };
    var which = "#h"+(hour-12);
    $(which).addClass("on");
    };

    and it will work perfect for both 12am and 12pm.

Leave a reply to Gary Cancel reply