The code that starts the countdown is here:
window.onload = function() {
countdown('countdown');
}
instead, you can remove this and the built-in button in content that triggers a countdown with onclick behavior:
<a href="javascript:void(0);" onclick="countdown('countdown')">Click Me to Start</a>
The timer is stored in
var interval;
To stop it, you can enter another button that calls clearInterval (interval):
<a href="javascript:void(0);" onclick="clearInterval(interval)">Click Me to Stop</a>
In reset, do what others have suggested and save the new value in minutes, seconds :)
source
share