1. Home
  2. Computing & Technology
  3. JavaScript

Multiple Analog Clocks

3. Positioning the Clock(s)

clr gif
Join the Discussion

Questions? Comments?

More of this Feature

Introduction Head Script Configuration

Unlike my original analog clock script the multiple clock script does not have any Javascript to be placed into the body of the web page. Instead we place an empty div in each location where we want a clock to appear and give it an id that starts with "clock_" followed by a unique identifier for each clock (the sample configuration script uses "a" as the last character and I used "a", "b", and "c" for the three clocks on the sample page). For example:

<div id="clock_a"></div>

The code that you now have will display one clock on your page in the selected position. If that is what you wanted then you are finished. If not then it is time to look at the configuration options.

Introduction | Head Scripts | Positioning the Clock(s) | Configuring the Script
Explore JavaScript
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.