change timer color at limit

This commit is contained in:
Damien Elmes 2012-03-16 20:11:36 +09:00
parent 3304bc0aef
commit 259c5c6dfc

View file

@ -442,9 +442,13 @@ var updateTime = function () {
if (s < 10) { if (s < 10) {
s = "0" + s; s = "0" + s;
} }
var e = $("#time").text(time); var e = $("#time");
if (maxTime == time) {
e.html("<font color=red>" + m + ":" + s + "</font>");
} else {
e.text(m + ":" + s); e.text(m + ":" + s);
} }
}
function showQuestion(txt, maxTime_) { function showQuestion(txt, maxTime_) {
// much faster than jquery's .html() // much faster than jquery's .html()