News for hackers. Stuff that matters.
Re:A Colorful Clock With CSS and jQuery by Tutorialzine on Thursday December 31, 2009 @12:56PM (#1024625)
Hello Nathan, and thank you for the comment.

Actually the “off by one” bug is by design – it looks empty when the value of the dial is zero and the colorful ring around it is completely gone (and given it is midnight it would stay like this for an hour).

However you are free to change it – you’ll just need to change the line above from:

    var angle = (360/total)*(current+1); 
To something like this:

    var angle = (360/(total-1))*current;
Re:A Colorful Clock With CSS and jQuery by NathanKP on Thursday December 31, 2009 @01:01PM (#1024636)
Hmm, that is a good point about the "empty ring" but it looks bad when the ring is off by one for the entire rest of the day.