Giter Site home page Giter Site logo

remove "days" display about timecircles HOT 9 CLOSED

wimbarelds avatar wimbarelds commented on August 20, 2024
remove "days" display

from timecircles.

Comments (9)

yuhao-nyc avatar yuhao-nyc commented on August 20, 2024

my current time circle control code.

        $(function() {
            //circles customizations
            $("#countdown").TimeCircles({
                count_past_zero: false,
                 "bg_width": 1,
                 "fg_width": 0.07777776,
                 "circle_bg_color": "#c0cbcb",
                 "time": {
                    "Hours": {
                        "text": "Hrs",
                        "color": "#e7ebeb"
                    },
                    "Minutes": {
                        "text": "Min",
                        "color": "#e7ebeb"
                    },
                    "Seconds": {
                        "text": "Sec",
                        "color": "#e7ebeb"
                    }
                }
            })
        });

from timecircles.

wimbarelds avatar wimbarelds commented on August 20, 2024

you'll need to use total_duration. Set it to however many seconds the circles should indicate when they're all full (So perhaps 3 days would be "everything full", then 3 * 24 * 60 * 60)

from timecircles.

yuhao-nyc avatar yuhao-nyc commented on August 20, 2024

Hi I think I misunderstand you earlier. Now I understand everything u suggest earlier. I will explain my case in detail.
I wanted to get a countdown circle only limited to 48 hours. So to achieve this, the " total_duration: 172800,". Then I set up the html
<div id="countdown" data-date="2014-03-20 17:11:00" style="width: 82%; margin: 25px;"></div>
So it should be work like "how long it will remaining, within 48 hours before 2014-3-20 17:11:00"
Am I understanding in a right way.

Right now it seems to work. Point out if I didn't quite get the idea in a right way.

Thanks so much

from timecircles.

wimbarelds avatar wimbarelds commented on August 20, 2024

I think you understood what I meant yes. If it's working as you wanted it to now, than I'm sure you got it right!

from timecircles.

yuhao-nyc avatar yuhao-nyc commented on August 20, 2024

OK, cause earlier its really a mess.

from timecircles.

Voodaii avatar Voodaii commented on August 20, 2024

I've been having a bit of trouble with my attempt to hide the days circle. The "text" and "color" attributes work perfectly, but the "show" attribute seems to have no effect. Here is my code, am I doing something wrong?

var timeCircles = $(".someTimer").TimeCircles({

"time": {
    "Days": {            
        "text": "Days",
        "color": "#FFCC66",
        "show": false
    },
    "Hours": {
        "text": "Hours",
        "color": "#99CCFF",
        "show": true
    },
    "Minutes": {
        "text": "Minutes",
        "color": "#BBFFBB",
        "show": true
    },
    "Seconds": {
        "text": "Seconds",
        "color": "#FF9999",
        "show": true
    }
}

});

Here is the full code:
circleTimer.txt

from timecircles.

yuhao-nyc avatar yuhao-nyc commented on August 20, 2024

I see everything looks OK from me. im not sure why it didnt work.
maybe try not define the function with timeCircles? and in later part of your code its controlling with that function

from timecircles.

yuhao-nyc avatar yuhao-nyc commented on August 20, 2024

if still not working try change the show attributes in TimeCircles.js. might not be a great idea tho

from timecircles.

wimbarelds avatar wimbarelds commented on August 20, 2024

Can you please show a codepen or something alike where you have your full code? An example page I can look at?

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.