I am using a Keith Wood jQuery countdown timer. http://keith-wood.name/countdown.html
What I want to achieve is a counter with stop and resume buttons, as well as controls for adding and subtracting minutes and seconds:
I create a counter (from 0 to 60 minutes) and pause it immediately, for example:
$('#contador_tiempo').countdown({ since: 0, format: 'MS', layout: '{mnn}{sep}{snn}' }); $('#contador_tiempo').countdown('pause');
But it looks like it is still running in the background. When I press the buttons to add or subtract, the functions perform operations on this background counter, not the displayed counter.
Full code on JSFiddle, with playback playback:
http://jsfiddle.net/J2XHm/4/
(play around with the controls a bit and you will see that it continues to count, although it is paused.)
Deses source share