-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
77 lines (74 loc) · 4.14 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<title>querySelector Quiz</title>
</head>
<body>
<header id="header" class="container-fluid mb-3">
<div class="row">
<div class="col-6 text-left">
<button type="button" class="btn btn-link" id="highScoreLink">
View Highscores
</button>
</div>
<div class="col-6 text-right">
<span >Time: <span id="timerVal">0</span></span>
</div>
</div>
</header>
<main class="container">
<section id="intro" class="text-center" style="display: block">
<h2>Coding Quiz Challenge</h2>
<p>Test your knowledge of using <code>document.querySelector()</code> to select html elements in the DOM. Try to answer all the questions before the timer goes to 0. Keep in mind that incorrect answers will be penalized 10 seconds!<br>Good luck!</p>
<button id="start" type="button" class="btn btn-info">Start Quiz</button>
</section>
<section id="quiz" style="display: none">
<div class="mb-2">
<code id="codeSnippet">
<span><main><section></span><br>
<span id="hl1"> <h1>Lorem ipsum dolor</h1></span><br>
<span id="hl2"> <p class="checked">Sit amet con.</p></span><br>
<span id="hl3"> <input type="radio" id="ipsum" <span class="d-md-none"><br> </span>name="lorem" value="lorem" checked></span><br>
<span id="hl4"> <label for="ipsum">dolor</label></span><span><br></span><br>
<span id="hl5"> <p class="ipsum">Ear alias git</p> </span><br>
<span id="hl6"> <p id="lorem">Example: <br> <span id="hl7"><img src="./img.gif" alt="ex1"></span></p></span><br>
<span id="hl8"> <img class="checked" src="./img.gif" <span class="d-md-none"><br> </span>alt="ex2"></span><br>
<span></section></main></span>
</code>
</div>
<p id="question">What argument should be passed to <code>document.querySelector('___')</code> inorder to select the html highlighed above?</p>
<div id="multipleChoice">
<button id="choice1" type="button" class="btn btn-info btn-block mb-1">1. Lorem ipsum!</button>
<button id="choice2" type="button" class="btn btn-info btn-block mb-1">2. quotes</button>
<button id="choice3" type="button" class="btn btn-info btn-block mb-1">3. quotes</button>
<button id="choice4" type="button" class="btn btn-info btn-block mb-1">4. quotes</button>
</div>
<div class="border-top text-left font-italic"><span> </span><span id="quiz-status">Wrong!</span></div>
</section>
<section id="quizComplete" style="display: none">
<h3>All done!</h3>
<p>Your final score is <span id="score">22</span>.</p>
<label for="initials">Enter initials:</label>
<input type="text" id="initials">
<button id="submitScore" type="button" class="btn btn-info">Submit</button>
<div id="done-status" class="border-top text-left font-italic">Wrong!</div>
</section>
<section id="highScores" class="text-center" style="display: none">
<h2>Highscores</h2>
<ol id="highScoreList" class="text-primary">
<li>AB - 22</li>
<li>AB - 22</li>
<li>AB - 22</li>
</ol>
<div id="highscore-status" class="font-italic mb-2">Wrong!</div>
<button id="back" type="button" class="btn btn-info">Go Back</button>
<button id="clear" type="button" class="btn btn-info">Clear Scores</button>
</section>
</main>
<script src="assets/js/questions.js"></script>
<script src="assets/js/script.js"></script>
</body>
</html>