https://github.com/think2011/z-countdown
倒计时
https://github.com/think2011/z-countdown
Last synced: 12 months ago
JSON representation
倒计时
- Host: GitHub
- URL: https://github.com/think2011/z-countdown
- Owner: think2011
- Created: 2016-10-10T09:07:15.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-14T06:25:13.000Z (over 9 years ago)
- Last Synced: 2024-08-11T09:54:26.343Z (almost 2 years ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# z-countdown
倒计时
```js
// var countdown = new Class(Date.now('2016-10-10 17:07:22'))
var countdown = new Class(Date.now() + 5000)
setTimeout(function () {
countdown.pause()
}, 800)
setTimeout(function () {
countdown.start()
}, 2000)
countdown
.on('countdown', function (time) {
console.log(time)
})
.on('end', function () {
console.log('end')
})
```