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 6a9fd92 commit 6f41572
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions static/js/quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,17 @@ $(document).ready(function () {
function initializeQuestion() {
const currentKey = questionKeys[currentQuestionIndex];
const question = questions[currentKey];
const translationLength = question.translation.length;

$("#info").fadeOut(fadeDuration, function () {
$("#sourceText").text(question.source);
$("#keyText").text(currentKey);

const translationLength = question.translation.length;
$("#inputBox").attr("maxlength", translationLength);

createBoxes(translationLength);

$("#info").fadeIn(fadeDuration);

$("#inputBox").val("")
});

$("#inputBox").val("").attr("maxlength", translationLength);
createBoxes(translationLength);
}

// 创建相应长度的 box
Expand Down

0 comments on commit 6f41572

Please sign in to comment.