forked from nieske/Untangle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
33 lines (28 loc) · 993 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Untangle</title>
</head>
<body>
<h1>Welcome to Untangle!</h1>
<div id="puzzle"></div>
<input id="answer" type="text" placeholder="Your answer here">
<button id="button">Check!</button>
<div id="outcome"></div>
<script src="untangle.js"></script>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script>
$(document).ready(function() {
puzzle.forEach(function(word) {
$('#puzzle').append('<div>' + word + '</div>');
});
$('#button').click(function() {
var userAnswer = $('#answer').val();
var correct = checkAnswer(userAnswer);
$('#outcome').text(correct ? 'hurray' : 'too bad');
});
});
</script>
</body>
</html>