You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great plugin and it nearly does what I need, but I don't quite follow how I'm supposed to attached the addEventListener(callback). I don't know what event I'm listening for since i'm waiting on TimeCircles object to finish.
For instance, I have an application where the user will start the timer, but I need to know when the timer is done to post a record or when x amount of time is left to play a sound.
I'm assuming I'd need to use this to "reset" the timer automatically after the time has expired.
Thanks.
The text was updated successfully, but these errors were encountered:
The lisener is called every single time a unit of time changes (seconds, minutes, hours, days).
To determine that time has run out, you would do something like:
$("#YourItem").TimeCircles().addListener(function(unit, amount, total){
if(total == 0) {
alert("Time has run out");
}
});
I would also recommend total to determine [x] amount of time is left. Total shows the total time in seconds until (or since) 0.
I'm not entirely sure what you mean by resetting the timer.
Great plugin and it nearly does what I need, but I don't quite follow how I'm supposed to attached the addEventListener(callback). I don't know what event I'm listening for since i'm waiting on TimeCircles object to finish.
For instance, I have an application where the user will start the timer, but I need to know when the timer is done to post a record or when x amount of time is left to play a sound.
I'm assuming I'd need to use this to "reset" the timer automatically after the time has expired.
Thanks.
The text was updated successfully, but these errors were encountered: