Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StopTimer and clearInterval #34

Closed
manutepowa opened this issue Oct 9, 2018 · 1 comment
Closed

StopTimer and clearInterval #34

manutepowa opened this issue Oct 9, 2018 · 1 comment

Comments

@manutepowa
Copy link

Hi!!
I have a timer and i want a function to stop timer.

var inter = $(`#my-record-${id} .timer`).startTimer();

But the library don't have any function to stop.

Thanks

@caike
Copy link
Owner

caike commented Oct 30, 2018

The following should work:

var inter = $(`#my-record-${id} .timer`).startTimer({ allowPause: true });

// This function will pause and also resume
function toggleTimer(){
  $(`#my-record-${id} .timer`).trigger('click');
}

Let me know how this goes and feel free to re-open this issue if you run into any issues.
Thank!

@caike caike closed this as completed Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants