summaryrefslogtreecommitdiff
path: root/wk8
diff options
context:
space:
mode:
Diffstat (limited to 'wk8')
-rw-r--r--wk8/pset/trivia/index.html25
1 files changed, 13 insertions, 12 deletions
diff --git a/wk8/pset/trivia/index.html b/wk8/pset/trivia/index.html
index ef74a8f..af0489a 100644
--- a/wk8/pset/trivia/index.html
+++ b/wk8/pset/trivia/index.html
@@ -5,19 +5,7 @@
<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('#answer1').addEventListener('click', function() {
- document.querySelector('#answer1').style.backgroundColor = green;
- });
- document.querySelector('#answer2').addEventListener('click', function() {
- document.querySelector('#answer2').style.backgroundColor = red;
- });
- document.querySelector('#answer3').addEventListener('click', function() {
- document.querySelector('#answer3').style.backgroundColor = red;
- });
- </script>
</head>
<body>
<div class="header">
@@ -32,6 +20,19 @@
<button id="answer1">answer1</button>
<button id="answer2">answer2</button>
<button id="answer3">answer3</button>
+ <script>
+ // TODO: Add code to check answers to questions
+ document.querySelector('#answer1').addEventListener('click', function() {
+ document.querySelector('#answer1').style.backgroundColor = green;
+ });
+ document.querySelector('#answer2').addEventListener('click', function() {
+ document.querySelector('#answer2').style.backgroundColor = red;
+ });
+ document.querySelector('#answer3').addEventListener('click', function() {
+ document.querySelector('#answer3').style.backgroundColor = red;
+ });
+
+ </script>
</div>
<div class="section">