Skip to content

Commit

Permalink
Try to fix #8
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyEye-FAST committed Jul 11, 2024
1 parent 34e5478 commit 4dff1f2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions static/js/quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ $(document).ready(function () {

const questionLength = translationText.length;
$("#inputBox").attr("maxlength", questionLength);
createBoxes(questionLength);
updateBoxes();

$(this).fadeIn(fadeDuration);

createBoxes(questionLength);
});
}

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 4dff1f2

Please sign in to comment.