1. Preview
  2. How it works
  3. Settings

Preview Led Element

It may be a countdown or a random number or a clock.


  • An example of the countdown. It counts time till 01.01..


  • Displaing of the random number.


  • Time displaing (format â€?hh:mm).


    Time displaing (format �hh:mm:ss).

    How it works?


    It's very simple :)

    Getting time_led.js into your HTML page:

    <script src="time_led.js"></script>

    You should name div element with id attribute:

    <div id="digital_led"></div>

    Adding parameters which will create your element:

    <script type="text/javascript">
    var config = {
    	id : "digital_led",
    	format : "hh:mm:ss",
    	hourformat : "12",
    	color : "#af0",
    	bgcolor : "#222",
    	size : 12,
    	rounded : 6,
    	led : "font1"};
    var myLed = new Led(config);
    </script>

    Settings


    Name Type Default Description
    id String "ledtime" Name of the div ID.
    type String "time" Type of used element ("countdown", "random" or "time").
    format String "hh:mm:ss" Format for time ("hh:mm:ss","hh:mm","mm:ss","hh","mm" or "ss").
    Format for countdown ("ddd:hh:mm:ss","hh:mm:ss","hh:mm","mm:ss","hh","mm" or "ss").
    hourformat Number 24 Hour time format (12 or 24).
    num String "0,9999999" Only for random number's.
    Form of writing "0,9999999" (displays any number from 0 to 9999999).
    Form of writing "12345" (display a certain number (for example 12345))
    color String "#fff" Number's color.
    bgcolor String "#000" Background's color.
    bgvisible String 1 Transparent background.
    timer String �/td> Time till ... (format: "2013:1:1:0:0:0" not more than one year from the current date).
    "2013:1:1:0:0:0" �"year:month:day:hour:minutes:seconds".
    size Number 16 Led size in pixels.
    rounded Number 4 Rounded corner of the led.
    pix_between Number 1 The distance between leds.
    font String "font3" Selection of built-in font ("font1", "font2" or "font3").
    time_zone Number �/td> You can indicate particular time zone (-12...12) or do nothing if you want to have displaying your local time zone.