Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hyunseob/countdown

A simple, lightweight countdown module
https://github.com/hyunseob/countdown

Last synced: 11 days ago
JSON representation

A simple, lightweight countdown module

Awesome Lists containing this project

README

        

# countdown
A simple, lightweight countdown module

## Example

``` javascript
const countdown = new Countdown(new Date(2017, 10, 30, 23, 59, 59)); // Date must be a future. If you put the past, it will always return zero values.
const $countdown = $('#countdown');

countdown.observe(({ days, hours, minutes, seconds }) => {
$countdown.text(`${days}:${hours}:${minutes}:${seconds}`);
});
```