Fast timer plugin for countdown and count forward
Clone or download
Latest commit f43ef9f Oct 2, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist small refactor Oct 1, 2018
src small refactor Oct 1, 2018
.babelrc small refactor Oct 1, 2018
.eslintignore add template, user callback and module exports May 2, 2018
.eslintrc small refactor Oct 1, 2018
.gitignore add template, user callback and module exports May 2, 2018
LICENSE Update LICENSE Sep 24, 2017
README.md add template, user callback and module exports May 2, 2018
gulpfile.js small refactor Oct 1, 2018
package.json small refactor Oct 1, 2018
tests.html small refactor Oct 1, 2018
yarn.lock small refactor Oct 1, 2018

README.md

TimezZ

TimezZ

With this plugin you can easily put a timer on your site, it works both ways. Using the config you can change the tags as letters and numbers, you can also change the text output next to the numbers.

Watch our site for more information and russian guide.

Usage

Connect

<script src="/js/timezz.min.js"></script>

HTML

<div class="timer j-timer"></div>

Initialization

new TimezZ('.j-timer');

Example Styling

.timer {
  font-size: 70px;
}

.timer span {
  color: #555;
}

.timer i {
  color: #bbb;
  font-size: 40px;
}

Config

new TimezZ('.j-timer', {
  date: 'January 1, 2040 00:00:00',
  daysName: 'd',
  hoursName: 'h',
  minutesName: 'm',
  secondsName: 's',
  isStop: false,
  template: '<span>NUMBER<i>LETTER</i></span> ',
  beforeCreate() {},
});
Setting Default Description Type
date January 1, 2040 00:00:00 Indicate the date string
daysName d How to name days string
hoursName h How to name hours string
minutesName m How to name minutes string
secondsName s How to name seconds string
isStop false Is this timer a working? boolean
template <span>NUMBER<i>LETTER</i></span> You can add any template to your timer string
beforeCreate Callback function

Author

@BrooonS

Licence

MIT licence