Giter Site home page Giter Site logo

Comments (9)

wimbarelds avatar wimbarelds commented on July 19, 2024

Hey there, some people have asked for help on similar (almost identical) use cases before. If you look through some of the older issues I'm sure you'll find what you need.

If not, let me know

from timecircles.

mustaqsheikh avatar mustaqsheikh commented on July 19, 2024

Hi, thanks for checking, and more importantly, for sharing this with us, I did look but maybe I am missing something, I don.t see any solutions where the time remains hidden after the page is reloaded. I can hide TimeCircles once the timer hots 0, but then it reappears ( with 0 values of course ) on refresh.

I would appreciate it if you point me in the right direction.

from timecircles.

GrahamDj avatar GrahamDj commented on July 19, 2024

Hi, you could set a if statement in your script that is executing TimeCircles. Just check if the current time has passed the set timedate for TimeCircles. If not you initialize TimeCircles, else you display the message.

from timecircles.

mustaqsheikh avatar mustaqsheikh commented on July 19, 2024

I already tried that, but the circles will reappear on page reload. Any idea on how to hide this even if the page is reloaded ?

from timecircles.

GrahamDj avatar GrahamDj commented on July 19, 2024

Did try like this:

var endTime;
var currentTime;
if(endTime > currentTime) {
$("#DateCountdown").TimeCircles();
}

By not calling $("#DateCountdown").TimeCircles(); the clock will not be displayed

from timecircles.

mustaqsheikh avatar mustaqsheikh commented on July 19, 2024

Can you provide a simple example , thanks in advance if you can.

from timecircles.

wimbarelds avatar wimbarelds commented on July 19, 2024
var TC = $("#Countdown").TimeCircles();

TC.addListener(unit, value, total) {
    var num = Math.abs(total);
    if(num == 59) {
        $("#Countdown").TimeCircles({ time: { Minutes: { show: false }, Hours: { show: false }, Days: { show: false } }});
    }
    elseif(num == 3599) {
        $("#Countdown").TimeCircles({ time: { Hours: { show: false }, Days: { show: false } }});
     }
    elseif(num == 86399) {
        $("#Countdown").TimeCircles({ time: { Days: { show: false }}});
    }
});

This is assuming it's counting down.

from timecircles.

mustaqsheikh avatar mustaqsheikh commented on July 19, 2024

I will give it a try, thanks.

from timecircles.

mustaqsheikh avatar mustaqsheikh commented on July 19, 2024

I have been unsuccessful in making this work, the circles remain visible when the counter reaches zero and when the page is reloaded.

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.