Code Monkey home page Code Monkey logo

timezz's People

Contributors

dependabot[bot] avatar letstri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

timezz's Issues

Как изменить формат вывода таймера.

Всем доброго времени суток.
Возникла такая проблема:
Есть код, который выводит таймер следующим образом:

<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

Both versions don't work on Safari

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!

Repeat Timer

Hi,

I Would like to know if its possible to repeat the same timer on a single page. Having more than one

with the same class working.

6.1.0: iOS doesn't display properly

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

https://123.1px.run/time/test/

How to display "year"?

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, 是否是必须配置的?

Feature to stop the countdown

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.