From 4dff1f262d55e162357022ac823b705a0a469e9f Mon Sep 17 00:00:00 2001 From: SkyEye_FAST Date: Fri, 12 Jul 2024 01:11:21 +0800 Subject: [PATCH] Try to fix #8 --- static/js/quiz.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/static/js/quiz.js b/static/js/quiz.js index 9330c2e..429afdb 100644 --- a/static/js/quiz.js +++ b/static/js/quiz.js @@ -38,10 +38,10 @@ $(document).ready(function () { const questionLength = translationText.length; $("#inputBox").attr("maxlength", questionLength); - createBoxes(questionLength); updateBoxes(); - $(this).fadeIn(fadeDuration); + + createBoxes(questionLength); }); } @@ -95,10 +95,6 @@ $(document).ready(function () { const correctAnswer = questions[currentKey].translation; if (input === correctAnswer) { - for (let i = 0; i < correctAnswer.length; i++) { - const box = $("#box" + (i + 1)); - box.css("background-color", "#79b851"); - } if ((currentQuestionIndex + 1) === questionKeys.length) { setTimeout(() => { showSummary();