diff options
Diffstat (limited to 'wk8/pset/trivia')
-rw-r--r-- | wk8/pset/trivia/index.html | 7 |
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> |