Results 1 to 3 of 3

Thread: [Javascript] Class-Based Javascript Analog Clock

  1. #1
    Join Date
    Oct 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default [Javascript] Class-Based Javascript Analog Clock

    1) CODE TITLE: Class-Based Javascript Analog Clock

    2) AUTHOR NAME/NOTES: Fordiman (via ByteMyCode.com)

    3) DESCRIPTION: This is the best Javascript clock implementation on our site. It displays an analog clock using a dynamically created set of divs that can be formatted using a style sheet and is implemented as a well-formed Javascript class.

    4) URL TO CODE: http://www.bytemycode.com/snippets/snippet/418/

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Javascript doesn't have classes, it uses prototype-based OO But nevertheless, a fairly nice script. I must enquire, though: why:
    Code:
    analogClock.prototypes = Array();
    ? Since you don't actually use it as an array, you might as well just use a plain Object; and since you only give it one property, you might as well append position directly to analogClock.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    How does it work?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •