Open Nvenom opened 11 years ago
You want to clear the interval instead
data.tick_function = function() {
var millis = data.incrementer();
if(!$this.data('stopwatch')) {
clearInterval(data.timerID);
return;
}
data.elapsed = millis;
data.target.trigger('tick.stopwatch', [millis]);
data.target.stopwatch('render');
};
I use this to count a users time spent with a dialog open, and i was feeling a bit lazy to bind a destroy function to all the dialog close functions, so naturally i added a little quick fix. im no expert so im not sure if this is okay or if it will continue to run "render"
Changed
To This