Tutorial: How to Create a Countdown Timer

Have you ever wanted to add a countdown timer to your eLearning course, but weren't sure how to set one up?

Perhaps you're building a scenario where the learner would normally need to make a quick decision, so you want to make sure the scenario reflects that time pressure?

In this tutorial, we will look at how to use some JavaScript to add a countdown timer to a course and trigger a change in the course when the timer runs out.

Click here to see the tutorial, click here to see a demo and here to download the source file.

Let me know if you have any questions, comments or are stuck with implementing any of this. I'm happy to help where I can.



7 Replies
Ansh ☀

Hi Matthew,

Thanks for sharing the tutorial. I have used the countdown code in a couple of my assignments. It works great.

Question - Is it possible to just show seconds and milliseconds? I am creating a custom quiz where the user needs to finish a question in less than 5 seconds. I want to show the counter for second as well as milliseconds.

Looking forward to your guidance.