Giter Site home page Giter Site logo

Comments (7)

wimbarelds avatar wimbarelds commented on July 19, 2024

.end() does something else entirely. You're looking for something more like:

$("#Countdown").TimeCircles().addListener(function(unit, value, total) {
    if(total <= 0) location.reload(true);
});

from timecircles.

oliveratgithub avatar oliveratgithub commented on July 19, 2024

👍 Sweet! Thank you for your prompt answer! Works perfectly.

Could you add this example to the documentation? I think it might help others trying to implement an addListener event. :)

from timecircles.

wimbarelds avatar wimbarelds commented on July 19, 2024

I don't think it would be best suited for the documentation page, a better place would be an examples page. However, right now I am extremely pressed for time, and likely will be for the next few months to come.

from timecircles.

GrigoryanKaren avatar GrigoryanKaren commented on July 19, 2024

I have many timecircles and i need event when stopwatch is over .
AddListener is using to much memory.
Is there any alternative?

from timecircles.

wimbarelds avatar wimbarelds commented on July 19, 2024

Hello GrigoryanKaren,

When compared to the rest of TimeCircles, addListener uses extremely little memory unless you're doing something wrong (like continuously adding more and more listeners by accident).

from timecircles.

GrigoryanKaren avatar GrigoryanKaren commented on July 19, 2024

thank you for response, I have like 200 timecircles or even more,maybe even 500, end js memory rize up to 300,000 K , (i have 8 GB RAM ) and eventually my page going very very slow.
I am sure that i add for each instance one listener.

from timecircles.

wimbarelds avatar wimbarelds commented on July 19, 2024

Even in that case, adding listeners would be an absolute fraction of the CPU/Memory used by the animations/visualization. I'd venture to say that removing just 1 instance of TimeCircles would likely free up more CPU/Memory than a thousand listeners (Mind you, thats an estimate).

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.