Giter VIP home page Giter VIP logo

tock.js's People

Contributors

falc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tock.js's Issues

[FIXED] Initialization from file's bottom

Dear Aitor,
looking at how you implemented Tock with var Tock=function(a){... and trying to adapt it to the project, I face a confusing challenge. You see, I have to load it either within <head></head> or at the top of <script></script> in the footer. Actually I'm used to load helpers at the very bottom and reserve top part for actual code. For example, check base58 and z85, they work perfectly fine from any place.

[FIXED] Call from lap

Dear Aitor,
could you be so kind and tell me why the following doesn't work?

countdown1 = new Tock({
    countdown: true,
    start_time: 10000,
    on_tick: function() {
        document.querySelector('#timer').innerHTML = countdown1.lap('Clear field in {m}:{ss} <a href="javascript:countdown1.reset();clearField();">now</a>');
    },
    on_complete: function() {
        clearField();
    }
});

Countdown continues to run after now is clicked, however is expected to stop. It works only if <a href="javascript:countdown1.reset();clearField(); is placed somewhere outside, but I would prefer not to create separate span for control if it's possible.

Update: following doesn't work as well

on_tick: function() {
    document.getElementById("job-result-timer").innerHTML =
    "Wipe in "+
    countdown1.lap("{m}:{ss}")+
    " <a href='javascript:countdown1.reset();clearField();'>now</a>";
},

[FIXED] Milliseconds customization

Dear Aitor,
currently Tock seems to output 3 digits for milliseconds, however only the first one is changed noticeably, other two are changed so fast so they look as still (frozen at 0, or 9, or something) and it just creates flickering clutter (in my naive opinion, of course). Could you improve Tock to able to customize look of milliseconds? So {mm}:{ss}.{l} -> 01:49.5, like here.

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.