focus type answer area after it's appeared
This commit is contained in:
parent
412d37fc13
commit
d6c8c6e272
@ -38,15 +38,16 @@ function _showQuestion(q, a, bodyclass) {
|
|||||||
_makeHidden($("#"+currentAns));
|
_makeHidden($("#"+currentAns));
|
||||||
// and reveal question when processing is done
|
// and reveal question when processing is done
|
||||||
MathJax.Hub.Queue(function () {
|
MathJax.Hub.Queue(function () {
|
||||||
$("#_question").css("visibility", "visible").fadeTo(fadeTime, 1);
|
$("#_question").css("visibility", "visible").fadeTo(
|
||||||
});
|
fadeTime, 1, function () {
|
||||||
});
|
|
||||||
|
|
||||||
// focus typing area if visible
|
// focus typing area if visible
|
||||||
typeans = document.getElementById("typeans");
|
typeans = document.getElementById("typeans");
|
||||||
if (typeans) {
|
if (typeans) {
|
||||||
typeans.focus();
|
typeans.focus();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// return to top of window
|
// return to top of window
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user