oTree Forum >

Timeout pause/resume

#1 by jkupb

Pausing and resuming the timeout countdown is not working properly with `$('.otree-timer__time-left').countdown('pause');`. The inner HTML is stopped, but not the countdown itself. When you 'resume' the countdown is not resumed from the time it has been paused but just jumps to the position it would have been without a pause.

Do you have a solution?

#2 by Chris_oTree

The oTree countdown timer cannot be paused. If you want that, you should implement your own timer in JavaScript, using setInterval.

#3 by yzhong

Did you manage to write a timer that can pause and resume properly? I also need such a timer. Would be nice if I could get some inspirations. Thanks!

#4 by jkupb

You should try https://albert-gonzalez.github.io/easytimer.js/

Write a reply

Set forum username