letstri / timezz Goto Github PK
View Code? Open in Web Editor NEWWith this plugin, you can easily make a stopwatch or timer on your site. Just init, style and enjoy.
License: MIT License
With this plugin, you can easily make a stopwatch or timer on your site. Just init, style and enjoy.
License: MIT License
I found that [email protected] uses UTC0 (Universal Coordinated Time) for countdown by default. How do I initialize the time zone?
demo: https://123.1px.run/time/
发现 [email protected] 默认使用的是 UTC0 (世界协调时)进行倒计时,请问我应该如何初始化时区?
案例:https://123.1px.run/time/
Hi there,
First of all, thank you very much for this magnificent script!
I was wondering if there is a possibility to just stop the countdown on the given time, but I was surprised that it seems this in't possible at all?!
However, this is just a small touchup of your script.
Unfortunately, I don't have a gulp environment right now to build this here -
the needed logic here is like this:
add option: stop: 1
and
if(stop && distance<0 ) { isStopped=1; countDays = 0; countHours = 0; countMinutes = 0; countSeconds = 0; }
should go to line 63 of timezz.js
Best regards, MT
Hi,
On Safari 11.0.2 the new version of the plugin (expectedly) doesn't work because of the ellipsis. But the old ES6 doesn't work either :( All numbers (days, hours ..) are NaN. Any idea how to fix?
Thank you!
It can be displayed normally on both the computer and the Android mobile phone, but not on iOS. What is the reason?
我按住 README 中指引进行操作,电脑上 Chrome 和 Android 上Chrome 都可以正常显示,但是在 iOS 设备上(Chrome 和 Safari)无法正常显示倒计时,
views([email protected])
案例:基于 timezz 6.1.0
Hi,
I Would like to know if its possible to repeat the same timer on a single page. Having more than one
Hi, is there a way to continue counting up in minutes instead of transitioning from 59:59 to 01:00:00. In this example, it would start counting up to 60:00 and then a minute later 61:00 etc...
Всем доброго времени суток.
Возникла такая проблема:
Есть код, который выводит таймер следующим образом:
<div class="timer j-timer">
<span>07<span/>
<span>07<span/>
<span>07<span/>
<span>07<span/>
</div>
А мне нужно, чтобы выводило так:
<div class="timer j-timer">
<div>
<span>0<span/><span>7<span/>
<div/>
<div>
<span>0<span/><span>7<span/>
<div/>
<div>
<span>0<span/><span>7<span/>
<div/>
<div>
<span>0<span/><span>7<span/>
<div/>
</div>
Что нужно изменить в коде?
Сам код:
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/*!
* TimezZ v3.0.1: Plugin for countdown and count forward
*
* Contribute: https://github.com/BrooonS/TimezZ
* Released under the MIT license: http://opensource.org/licenses/MIT
*/
var ONE_SECOND = 1000;
var ONE_MINUTE = ONE_SECOND * 60;
var ONE_HOUR = ONE_MINUTE * 60;
var ONE_DAY = ONE_HOUR * 24;
var TimezZ = function () {
function TimezZ(element) {
var userSettings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, TimezZ);
this.element = document.querySelector(element);
this.settings = _extends({
date: 'Jan 01, 2040 00:00:00',
daysName: 'd',
hoursName: 'h',
minutesName: 'm',
secondsName: 's',
numberTag: 'span',
letterTag: 'i',
isStop: false
If I want to add a "year" before the first unit "day", how do I display the "year"?
如果我要把第一个单位”天“前面再加一个”年“,请问如何显示"年"?
canContinue: true,
Is it mandatory?
canContinue: true,
是否是必须配置的?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.