Package Exports
- ds-countdown
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ds-countdown) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ds-countdown
Install via npm
npm i -S ds-countdown
A simple countdown
Example
new Countdown({
id: "ds-Countdown",
targetTime: '2017-01-01 00:00:00',
noDay: false,
hideDayAtZero: false,
separator: '/',
afterEnd() {
alert("Time over !")
}
});
<div id="ds-Countdown"></div>
<!-- or -->
<div id="ds-Countdown">00:00:00:00</div>
Options
- targetTime : string, format = yyyy-mm-dd hh:mm:ss (convert to timestamp)
- noDay : hide the variable Day and minutes are calculate with the number of days
- hideDayAtZero : Minutes are calculated on the number of day & hide the variable Day
- afterEnd : callback function initialize after the countdown reaches 00:00:00:00
- separator : use a custom separator