Closed brainbolt closed 10 years ago
The addListener function has a second parameter which determines whether the events should also trigger for time-units that are hidden. If you change your code as follows, the events should work:
$timer.data('timer', 60).TimeCircles({
time: {
Days: { show: false },
Hours: { show: false },
Minutes: { show: true },
Seconds: { show: false }
},
total_duration: 60,
count_past_zero: false
});
$timer.TimeCircles().addListener(function (unit, value, total) {
console.log('fired');
}, "all");
Great, thank you.
Using the following code, I see 'fired' logged to the console every second:
However, if I switch the visibility of Minutes and Seconds, like the following, the addListener function is never fired: