diff --git a/static/quiz_item.coffee b/static/quiz_item.coffee index a72bb3d..4c0516a 100644 --- a/static/quiz_item.coffee +++ b/static/quiz_item.coffee @@ -100,6 +100,9 @@ toggleQuizMode = () -> $(document).keypress (e) -> if(e.which == 13) $("#submit-answer").click(); + else + if($("#kana").hasClass("wrong")) + $("#kana").removeClass("wrong") $("#submit-answer").click (e) -> e.preventDefault(); diff --git a/static/quiz_item.js b/static/quiz_item.js index 4a9d8c1..4d869cb 100644 --- a/static/quiz_item.js +++ b/static/quiz_item.js @@ -147,6 +147,10 @@ $(document).keypress(function(e) { if (e.which === 13) { return $("#submit-answer").click(); + } else { + if ($("#kana").hasClass("wrong")) { + return $("#kana").removeClass("wrong"); + } } });