| 1234567891011121314151617 |
- let countdownNumber = 30;
- const countdownElement = document.getElementById('countdown');
- const countdownCircle = document.querySelector('.countdown-circle');
- const countdownInterval = setInterval(() => {
- countdownNumber--;
- countdownElement.textContent = countdownNumber;
- // Update the circle progress
- countdownCircle.style.background = `conic-gradient(#E6871D ${360 - ((30 - countdownNumber) / 30) * 360}deg, lightgray 0)`;
- if (countdownNumber <= 0) {
- clearInterval(countdownInterval);
- // Call the function to send data to the server when the countdown reaches zero
- sendAnswersToServer();
- }
- }, 1000);
|