-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.html
62 lines (49 loc) · 1.25 KB
/
2.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
<!DOCTYPE html>
<html lang="zh_CN">
<head>
<meta charset="UTF-8">
<title>船</title>
<link rel="stylesheet" href="css/easyzoom.css" />
</head>
<body>
<div class="easyzoom easyzoom--overlay easyzoom--with-thumbnails is-ready">
<a href="large/image2.jpg">
<img src="small/image2.jpg" alt="">
</a>
</div>
<ul class="thumbnails">
<li>
<a href="large/image1.jpg" data-standard="small/image1.jpg">
<img src="thumb/image1.jpg" alt="">
</a>
</li>
<li>
<a href="large/image2.jpg" data-standard="small/image2.jpg">
<img src="thumb/image2.jpg" alt="">
</a>
</li>
<li>
<a href="large/image3.jpg" data-standard="small/image3.jpg">
<img src="thumb/image3.jpg" alt="">
</a>
</li>
<li>
<button onclick="window.location.href='index.html'">返回主页</button>
</li>
</ul>
<script src="js/jquery.min.js"></script>
<script src="js/easyzoom.js"></script>
<script>
// Instantiate EasyZoom instances
var $easyzoom = $('.easyzoom').easyZoom();
// Get an instance API
var api = $easyzoom.data('easyZoom');
$('.thumbnails').on('click', 'a', function(e) {
var $this = $(this);
e.preventDefault();
// Use EasyZoom's `swap` method
api.swap($this.data('standard'), $this.attr('href'));
});
</script>
</body>
</html>