-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (37 loc) · 1.38 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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<h1>Which is cuter?</h1>
<!-- first panel shows at the start by using active class -->
<div class="panel active" id="p1">
<!-- give each button an id -->
<button id="blackwhitecat" onclick="handleAnswer(25)"></button>
<!-- each function call should pass a score -->
<button id="fluffy" onclick="handleAnswer(0)"></button>
</div>
<!-- other panels hidden by default -->
<div class="panel" id="p2">
<button id="grey" onclick="handleAnswer(0)"></button>
<button id="tortoiseshell" onclick="handleAnswer(25)"></button>
</div>
<div class="panel" id="p3">
<button id="ginger" onclick="handleAnswer(0)"></button>
<button id="black" onclick="handleAnswer(25)"></button>
</div>
<div class="panel" id="p4">
<button id="siamese" onclick="handleAnswer(25)"></button>
<button id="tabby" onclick="handleAnswer(0)"></button>
</div>
<!-- final panel has non-clickable local image -->
<div class="panel" id="p5">
<img src="end.gif" />
<!-- number for updating is identified with an id -->
<p>Your score is: <span id="score">0</span>/100</p>
</div>
</body>
<!-- call javascript after html is loaded -->
<script src="game.js" type="text/javascript"></script>
</html>