-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
32 lines (29 loc) · 796 Bytes
/
index.html
File metadata and controls
32 lines (29 loc) · 796 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>Demo</title>
<style>
#img1, #img2 { display: none; }
</style>
</head>
<body>
<img src="/example/test1.jpg" id="img1" />
<img src="/example/test2.jpg" id="img2" />
<script src="/js/puzzle.js"></script>
<script src="/vendor/domready.js"></script>
<script>
domready(function() {
var img1 = document.getElementById('img1');
img1.addEventListener('load', function() {
var puzzle = new Puzzle();
puzzle.getImageSignature(img1);
});
var img2 = document.getElementById('img2');
img2.addEventListener('load', function() {
var puzzle = new Puzzle();
puzzle.getImageSignature(img2);
});
});
</script>
</body>
</html>