This commit is contained in:
2019-07-14 22:18:41 +02:00
parent 414a12e852
commit 1f17367c98

View File

@@ -88,9 +88,9 @@ function showQuestion() {
answer1.innerHTML = question.answers[1]; answer1.innerHTML = question.answers[1];
answer2.innerHTML = question.answers[2]; answer2.innerHTML = question.answers[2];
answer0.style.backgroundColor = "gray"; answer0.style.backgroundColor = "lightgray";
answer1.style.backgroundColor = "gray"; answer1.style.backgroundColor = "lightgray";
answer2.style.backgroundColor = "gray"; answer2.style.backgroundColor = "lightgray";
} }
function answerQuestion(event) { function answerQuestion(event) {
@@ -107,6 +107,7 @@ function answerQuestion(event) {
} else { } else {
falschAudio.play(); falschAudio.play();
target.style.backgroundColor = "red"; target.style.backgroundColor = "red";
console.log(question.solution);
document.getElementById("answer" + question.solution).style.backgroundColor == "green"; document.getElementById("answer" + question.solution).style.backgroundColor == "green";
} }
setTimeout(function () { setTimeout(function () {