Answer input textbox colour is reset after wrong entry on next keypress.
This commit is contained in:
parent
92347da966
commit
2502c099a3
@ -100,6 +100,9 @@ toggleQuizMode = () ->
|
|||||||
$(document).keypress (e) ->
|
$(document).keypress (e) ->
|
||||||
if(e.which == 13)
|
if(e.which == 13)
|
||||||
$("#submit-answer").click();
|
$("#submit-answer").click();
|
||||||
|
else
|
||||||
|
if($("#kana").hasClass("wrong"))
|
||||||
|
$("#kana").removeClass("wrong")
|
||||||
|
|
||||||
$("#submit-answer").click (e) ->
|
$("#submit-answer").click (e) ->
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -147,6 +147,10 @@
|
|||||||
$(document).keypress(function(e) {
|
$(document).keypress(function(e) {
|
||||||
if (e.which === 13) {
|
if (e.which === 13) {
|
||||||
return $("#submit-answer").click();
|
return $("#submit-answer").click();
|
||||||
|
} else {
|
||||||
|
if ($("#kana").hasClass("wrong")) {
|
||||||
|
return $("#kana").removeClass("wrong");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user