Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/hyunseob/countdown
- Owner: HyunSeob
- License: mit
- Created: 2017-10-31T07:59:24.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-06T05:04:24.000Z (about 7 years ago)
- Last Synced: 2024-09-15T10:40:57.492Z (about 2 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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}`);
});
```