Giter Site home page Giter Site logo

Comments (4)

wimbarelds avatar wimbarelds commented on July 19, 2024

The reason for this is because that is not technically a page-open timer. When an instance of TimeCircles is given neither a date nor a timer, it sets the current date as the comparison date. If you were to do something like: <div id="PageOpenTimer" data-timer="0"> you should get the effect you're going for.

[edit] I haven't tested this, if it doesn't work- please let me know.
The way you describe it working is not "wrong" for the code sample, it would be wrong if you set the data-timer attribute.

from timecircles.

chukwu avatar chukwu commented on July 19, 2024

Could you please look into issue #10 for me....thanks!!!

from timecircles.

Eonasdan avatar Eonasdan commented on July 19, 2024

@wimbarelds thanks for answer this. One other question, when I hit stop, how can get the total time? Is there an event for that?

from timecircles.

wimbarelds avatar wimbarelds commented on July 19, 2024

There's not a documented / straightforward way, but you should be able to do this:

$("#PageOpenTimer").TimeCircles().foreach(function(instance) {
    var time = instance.timeLeft();
});

from timecircles.

Related Issues (20)

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.