-
Notifications
You must be signed in to change notification settings - Fork 0
/
etchasketch.html
41 lines (35 loc) · 1.16 KB
/
etchasketch.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
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Etch-a-Sketch</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="sketch.js"></script>
<style>
#canvas { width: 960px; margin: auto; border-right:1px solid; border-bottom: 1px solid;}
.cell { float: left; }
.cell > div { border-left: 1px solid; border-top: 1px solid; height: 100%; width: 100%; }
.cell.active { background: #000 !important; }
.cell.active > div { background: #666 !important; }
</style>
</head>
<body>
<div id="canvas">
<div class="container"></div>
<div style="clear: both;"></div>
</div>
<button type="button" onClick="defineGrid();">New Grid</button>
<button type="button" onClick="clearGrid();">Clear Grid</button>
<br>
<form>
Controls:<br>
<input id="ctrl-mouse" type="radio" name="controls" value="mouse" checked="checked"/> <label for="ctrl-mouse">Mouse</label><br>
<input id="ctrl-keys"type="radio" name="controls" value="keys"/> <label for="ctrl-keys">Arrow Keys</label>
</form>
<script type="text/javascript">
$(document).ready(function(){
gridInit();
});
</script>
</body>
</html>