A basic javascript countdown
HTML CSS JavaScript
Latest commit eefcb26 Jul 25, 2016 @onokumus bower package update
Permalink
Failed to load latest commit information.
.gitignore
.npmignore
README.md
bower.json
config.js
index.html
mcount.js
package.json
test.css

README.md

mcount

NPM version Bower version

Simple, easy, lightweight countdown plugin with moment.js

Install

  • bower bower install mcount
  • npm npm install mcount
  • github mcount

Setup

add data-mcount attribute html file

<span data-mcount="years"></span>
<span data-mcount="months"></span>
<span data-mcount="days"></span>
<span data-mcount="hours"></span>
<span data-mcount="minutes"></span>
<span data-mcount="seconds"></span>

load moment.js

<script src="moment.js"></script>

create config file

var mcountConfig = {
  end: moment('2019-03-20'),
  start: moment('2015-08-01')
};

load mcount plugin

<script src="mcount.js"></script>

License

MIT © onokumus