pfarmer/jquery-countdown — Issue #24: What is wrong on my stop() method?
Author: mrbrazzi
Created: 2012-01-13 16:12:08+00:00
State: open

Hi, thanks por new updates... this plugin is great... well... I've been trying to do a stop method based on pause method... the idea is stop the countdown, clear the interval and start from 0 because I need reinitiate the countdown with new startTime value... it is like if exits a method reset that accept a new startTime value and from this moment the countdown start from this value.

from line 236 to 246 on jquery.countdown.js file... this is my code:

var stop = function() {
if (interval == undefined)
interval = setInterval(moveStep(0), 1000);
}

this.data("countdown", {
"start": start,
"pause": pause,
"stop": stop
});

...but, to really stop the countdown I must call pause() before stop()... it can't be done by other way?.

I would like to know what is wrong on my code.

Thanks
Best regards