ClassyLED
Your very own countdowns, courtesy of jQuery!
Introduction
ClassyLED is a jQuery plugin written by Marius Stanciu - Sergiu, a plugin that can be used as a countdown, a clock or as a random numbers.
Download it
License
This jQuery plugin is distributed under the MIT license. Enjoy!Demo
Setup
First you need to include the jQuery and Raphael libraries, since ClassyLED depends on them. You can download them from the jQuery website, Raphael website or link them directly from the Google CDN.
Secondly, you need to include the ClassyLED javascript file into your page. You can do it by adding the code below to your page.
Next, you create the div element container that you want to apply ClassyLED on.
As the last step, you trigger the ClassyLED() function on the element you just created. In this case, we trigger the function on the div with the class led.
$('.led').ClassyLED({ type: 'countdown', format: 'ddd:hh:mm:ss', color: '#eee', backgroundColor '#000', size: 16 });
Options
-
Parameters
- type - type of the LED display, can be countdown, random or time, default is time
- format - time format for the led (ex. "hh:mm:ss"), default is hh:mm
- color - hex color of the digits, default is #FFF
- bgcolor - hex color of the background, default is #000
- size - LED digit size in pixels, default is 12
- rounded - round radius of the LED digits, default is 1
- spacing - spacing between the digits, default is 1
- fontType - type of the LED font display, between 1 and 3, default is 1