Comments (8)
Hey there, the option you're looking for is total_duration
. Try:
$("#YourTimer").TimeCircles({ total_duration: 15});
from timecircles.
Thanks :) Worked like a charm. Could you tell me if its possible to change the color so that when there are 15 seconds to 10 seconds, the color is green. When the time is between 10 seconds and 5 seconds, the color is yellow, when it gets to 5 seconds to 0, the color is red? Thanks a lot
from timecircles.
That would be something like:
var $timerDiv = $("#YourTimer");
$timerDiv.TimeCircles({ total_duration: 15, time: { Seconds: { color: "#00FF00" } }}).addListener(unit, value, total) {
if(total == 10) $timerDiv.TimeCircles({ time: { Seconds: { color: "#FFFF00" } } });
else if(total == 5) $timerDiv.TimeCircles({ time: { Seconds: { color: "#FF0000" } } });
});
(I haven't tested this code, but the code should look something like this).
from timecircles.
Thanks for your help. That last bit of code doesn't work or I'm doing it wrong.
from timecircles.
Could you link it to me so I can have a look?
from timecircles.
Ok, here's the link: http://hoppedupdesigns.com/countdownTimer/index.html
from timecircles.
var $timerDiv = $("#YourTimer");
$timerDiv.TimeCircles({ total_duration: 15, time: { Seconds: { color: "#00FF00" } }}).addListener(function(unit, value, total) {
if(total == 10) $timerDiv.TimeCircles({ time: { Seconds: { color: "#FFFF00" } } });
else if(total == 5) $timerDiv.TimeCircles({ time: { Seconds: { color: "#FF0000" } } });
});
Found an error, try this:
from timecircles.
Yep, that fixed it. Works great now. Thanks for your help and time. I'll stop bugging you now :)
from timecircles.
Related Issues (20)
- Call a angular function from a timecircle listener
- timecircles cancels a timeout set outside of it
- Counter Clockwise change second color
- How to change the color of canvas during the counterclockwise
- Can not initialize plugin in Bootstrap 4 modal popup
- Text label for when the date/hour/minutes reach singular state
- Circle direction rtl HOT 1
- Radialfade function
- timecircles is not a function HOT 3
- Cpu Performance
- Customized outer and round progress bars
- Start-time from server HOT 2
- Change of color of the text HOT 1
- How to make counter not reset on page refresh
- After changing data-date="2011-01-01 00:00:00" dynamically, how to start timer again with this new updated date. HOT 1
- How to change timecircle to square
- More than 60 minutes countdown HOT 2
- center
- Circle Background Color Option Doesn't Work
- Site Not loading
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from timecircles.