-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Hi,
I had an issue with the method stop
. Immediately after stoping the countdown, i was reinitializing a new one on the same div. The problem was that it kept the old data.
For example:
1 - Countdown is at 1'47"
2 - I call stop
3 - I call an init with m = 2, s = 0
4 - The countdown displays 2'00" and immediatly it returns to 1"47 and keeps decreasing with the old parameters.
I solved this by adding a timeout before reinitializing the countdown:
countdown.countdown('stop');
window.setTimeout(function () {
countdown.countdown({
autostart: true,
m: 2,
s: 0
});
});
Thanks for this plugin
Activity