forked from jackmoore/zoom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
68 lines (63 loc) · 1.64 KB
/
demo.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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'/>
<title>jQuery Zoom Demo</title>
<style>
/* styles unrelated to zoom */
* { border:0; margin:0; padding:0; }
p { position:absolute; top:3px; right:28px; color:#555; font:bold 13px/1 sans-serif;}
/* optional icon style */
.zoomIcon {
width:33px;
height:33px;
position:absolute;
top:0;
right:0;
background:url(icon.png);
}
/* these styles are for the demo, and are not required for the plugin */
.zoom {
display:inline-block;
position:relative;
}
.zoom img {
display: block;
}
.zoom img::selection { background-color: transparent; }
#ex2 img:hover { cursor: url(grab.cur), default; }
#ex2 img:active { cursor: url(grabbed.cur), default; }
</style>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js'></script>
<script src='jquery.zoom.js'></script>
<script>
$(document).ready(function(){
$('#ex1').zoom();
$('#ex2').zoom({ on:'grab' });
$('#ex3').zoom({ on:'click' });
$('#ex4').zoom({ on:'toggle' });
});
</script>
</head>
<body>
<span class='zoom' id='ex1'>
<img src='daisy.jpg' id='jack' width='555' height='320' alt='Daisy on the Ohoopee'/>
<p>Hover</p>
</span>
<span class='zoom' id='ex2'>
<img src='roxy.jpg' width='290' height='320' alt='Roxy on the Ohoopee'/>
<p>Grab</p>
</span>
<span class='zoom' id='ex3'>
<img src='daisy.jpg' width='555' height='320' alt='Daisy on the Ohoopee'/>
<p>Click</p>
</span>
<ul><li>
<span class='zoom' id='ex4'>
<img src='roxy.jpg' width='290' height='320' alt='Roxy on the Ohoopee'/>
<p>Toggle</p>
</span>
</li></ul>
<br/>
</body>
</html>