Description
Countdown.js is a library that allows developers to set countdowns for any kind of interaction. For example, if you would like to submit a form, Countdown.js allows you to set a 5 second countdown and give the user a chance to cancel the submission. You can see it in action here.
countdown.js alternatives and similar libraries
Based on the "Date" category.
Alternatively, view countdown.js alternatives based on common mentions on social networks and blogs.
-
timeago.js
:clock8: :hourglass: timeago.js is a tiny(2.0 kb) library used to format date with `*** time ago` statement. -
jquery-timeago
:clock8: The original jQuery plugin that makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago"). -
Tempo
📆 Parse, format, manipulate, and internationalize dates and times in JavaScript and TypeScript. -
timezone-js
DISCONTINUED. Timezone-enabled JavaScript Date object. Uses Olson zoneinfo files for timezone data.
SaaSHub - Software Alternatives and Reviews
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of countdown.js or a related project?
README
Countdown.js
Countdown.js is a library that allows developers to set countdowns for any kind of interaction. For example, if you would like to submit a form, Countdown.js allows you to set a 5 second countdown and give the user a chance to cancel the submission. You can see it in action here.
Installation
If you use bower:
bower install countdown.js
Otherwise, you can download it from here.
API
new Countdown(duration, onTick, onComplete)
Begins a countdown. After duration
time has passed, the function onComplete
will be executed. Every second, the onTick
function will be executed.
Example:
var countdown = new Countdown(5, function(seconds) {
console.log(seconds); //log the number of seconds that have passed
}, function() {
console.log("Countdown complete!") //log that the countdown has complete
});
abort()
Terminates countdown.
Example:
countdown.abort();
getRemainingTime()
Returns remaining time in seconds.
Example:
countdown.getRemainingTime(); //=> 4
Example
http://gumroad.github.io/countdown.js/
Contribute
Install development dependencies
npm install
Test
npm test