diff --git a/prof/kursAnzeige.html b/prof/kursAnzeige.html index d70d51f..817ad92 100644 --- a/prof/kursAnzeige.html +++ b/prof/kursAnzeige.html @@ -126,13 +126,13 @@ setUserData(couchDB); resultDisplay.innerHTML = `
${percent}% positive
-
+
`; awnserList.appendChild(resultDisplay); - const scoreFill = document.getElementById("scoreFill") - if(percent < 40) { + const scoreFill = document.getElementById(`scoreFill${index}`) + if(percent < 30) { scoreFill.style.backgroundColor = "red"; } else if(percent < 70) { scoreFill.style.backgroundColor = "orange"; @@ -152,14 +152,14 @@ setUserData(couchDB); resultDisplayE.innerHTML = `
${percentE}% positive
-
+
`; awnserList.appendChild(resultDisplayE); - const scoreFillE = document.getElementById("scoreFill") - if(percentE < 40) { + const scoreFillE = document.getElementById(`scoreFill${index}`) + if(percentE < 30) { scoreFillE.style.backgroundColor = "red"; } else if(percentE < 70) { scoreFillE.style.backgroundColor = "orange";