diff options
Diffstat (limited to 'wk8/pset/trivia')
-rw-r--r-- | wk8/pset/trivia/index.html | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/wk8/pset/trivia/index.html b/wk8/pset/trivia/index.html index eb9bb37..744c6e5 100644 --- a/wk8/pset/trivia/index.html +++ b/wk8/pset/trivia/index.html @@ -5,7 +5,13 @@ <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap" rel="stylesheet"> <link href="styles.css" rel="stylesheet"> <title>Trivia!</title> + <script> + // TODO: Add code to check answers to questions + document.querySelector('button').addEventListener('click', function(event) { + }); + + </script> </head> <body> <div class="header"> @@ -17,23 +23,9 @@ <h2>Part 1: Multiple Choice </h2> <hr> <h3>QUESTION?</h3> - <button id="answer1">answer1</button> - <button id="answer2">answer2</button> - <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() { - body.style.backgroundColor = green; - }); - document.querySelector('#answer2').addEventListener('click', function() { - body.style.backgroundColor = red; - }); - document.querySelector('#answer3').addEventListener('click', function() { - body.style.backgroundColor = red; - }); - - </script> + <button>answer1</button> + <button>answer2</button> + <button>answer3</button> </div> <div class="section"> |