Forum Discussion
sabrmanz
4 years agoCommunity Member
Javascript Countdown Timer
Hello heroes!
I'm trying to create a Javascript countdown timer that starts at 02:30:00 and when the remaining time is over, the course is complete.
However, i'm facing this problem: everytime t...
MathNotermans-9
4 years agoCommunity Member
So by adding a new variable... isCountdownStarted... and setting that to true at start... and adding a condition when setting the variable 'count_start' to True...we ensure the timer wont be reset when continuing to a next question. In the Javascript ofcourse we set 'isCountdownStarted to false the moment the countdown starts. So now it wont reset at each question.
What still needs fixing is the resume behaviour. I set all slides including the question bank to 'Resume Saved State' but we now still need to make sure the variables for the duration will be changed so when resuming... it wont use the static variables as is now.