summaryrefslogtreecommitdiff
path: root/wk8
diff options
context:
space:
mode:
authorFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-07-05 05:25:02 +0000
committerFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-07-05 05:25:02 +0000
commitda01f42fb2dd18f3ec48d34c0b32db86f06df271 (patch)
treebb87cc2167b1ae2fc511e323aa8e887145d7ca53 /wk8
parent03e046a3f453655fec4df44648ca912202a11e5f (diff)
Thu, Jul 4, 2024, 10:25 PM -07:00
Diffstat (limited to 'wk8')
-rw-r--r--wk8/pset/trivia/index.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/wk8/pset/trivia/index.html b/wk8/pset/trivia/index.html
index af0489a..eb9bb37 100644
--- a/wk8/pset/trivia/index.html
+++ b/wk8/pset/trivia/index.html
@@ -22,14 +22,15 @@
<button id="answer3">answer3</button>
<script>
// TODO: Add code to check answers to questions
+ let body = document.querSelector('body');
document.querySelector('#answer1').addEventListener('click', function() {
- document.querySelector('#answer1').style.backgroundColor = green;
+ body.style.backgroundColor = green;
});
document.querySelector('#answer2').addEventListener('click', function() {
- document.querySelector('#answer2').style.backgroundColor = red;
+ body.style.backgroundColor = red;
});
document.querySelector('#answer3').addEventListener('click', function() {
- document.querySelector('#answer3').style.backgroundColor = red;
+ body.style.backgroundColor = red;
});
</script>