summaryrefslogtreecommitdiff
path: root/wk8/pset
diff options
context:
space:
mode:
authorFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-07-05 05:50:52 +0000
committerFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-07-05 05:50:52 +0000
commit19ad98e75182f0218702bc7b5034d1f128c53716 (patch)
treefa63eeed0d2687aea8d988cf3a32f843445d22e3 /wk8/pset
parent8e57df2b1ec0cc3d37c37fde52b4f2714ae974b1 (diff)
Thu, Jul 4, 2024, 10:50 PM -07:00
Diffstat (limited to 'wk8/pset')
-rw-r--r--wk8/pset/trivia/index.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/wk8/pset/trivia/index.html b/wk8/pset/trivia/index.html
index ee73a27..c0e8997 100644
--- a/wk8/pset/trivia/index.html
+++ b/wk8/pset/trivia/index.html
@@ -8,6 +8,7 @@
<script>
// TODO: Add code to check answers to questions
document.addEventListener('DOMContentLoaded', function() {
+
let correct = document.querySelector('.correct');
correct.addEventListener('click', function() {
correct.style.backgroundColor = 'green';
@@ -17,10 +18,10 @@
let incorrects = document.querSelectorAll('.incorrect');
for (let i = 0; i < incorrects.length; i++) {
incorrects[i].addEventListener('click', function() {
- incorrect.style.backgroundColor = 'red';
+ incorrects[i].style.backgroundColor = 'red';
document.querySelector('#feedback1').innerHTML = 'Incorrect :(';
});
- }
+ };
});
</script>