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

.stop() method? #19

Open
itconsulting-live opened this issue Nov 21, 2019 · 4 comments
Open

.stop() method? #19

itconsulting-live opened this issue Nov 21, 2019 · 4 comments

Comments

@itconsulting-live
Copy link

itconsulting-live commented Nov 21, 2019

It's a very good project, I found it much easier in use then FlipClock.js which I used before (and it also requires jQuery).
But I was surprised when I did not see any sign of a stop() method which would be useful in a big complex projects when you need to stop the counter earlier then the deadline occurs according to some app logic.

@PButcher
Copy link
Owner

Thanks for the feedback. Would this have the effect of pausing the clock, or zeroing it?

@itconsulting-live
Copy link
Author

Hi! I think the clock should be stopped, then possibly zeroed (but not necessarily) and then completely removed from the parent container.
Right now I'm doing this by calling clearInterval with clock's "countdown" field and then removing clock's elements from the DOM:

if(myClock !== false){
clearInterval(myClock.countdown);
myClock = false;
}
var element = document.getElementById('shabbat-clock-outer');
element.innerHTML = '';

@yashrajbharti
Copy link

These features is must needed, stop(), pause() and play() are basic ones that are needed in a lot of projects

@wen9218
Copy link

wen9218 commented May 25, 2024

Hi, thanks for good lib.
Yup. start(), stop(), play(), pause(), init() methods will be much useful
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants