-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.html
64 lines (55 loc) · 2.53 KB
/
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
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>xZoom</title>
<link type="text/css" rel="stylesheet" media="all" href="https://unpkg.com/xzoom/dist/xzoom.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<!-- Add fancyBox -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.2.1/jquery.fancybox.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.2.1/jquery.fancybox.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/xzoom/dist/xzoom.min.js"></script>
<script type="text/javascript">
(function ($) {
$(document).ready(function() {
//Integration with FancyBox 3 plugin
$(".xzoom, .xzoom-gallery").xzoom();
//Integration with fancybox version 3 plugin
$(".xzoom:first").bind('click', function(event) {
var xzoom = $(this).data('xzoom');
xzoom.closezoom();
var i, images = new Array();
var gallery = xzoom.gallery().ogallery;
var index = xzoom.gallery().index;
for (i in gallery) {
images[i] = {src: gallery[i]};
}
$.fancybox.open(images, {loop: false}, index);
event.preventDefault();
});
});
})(jQuery);
</script>
</head>
<body>
<div style="text-align:center;">
<div style="border:1px solid #ccc; display:inline-block; line-height:0;">
<img class="xzoom" src="gallery/preview/01_b_car.jpg" xoriginal="gallery/original/01_b_car.jpg" />
</div>
<div style="margin-top:10px">
<a href="gallery/original/01_b_car.jpg" style="display: inline-block;">
<img class="xzoom-gallery" width="68" src="gallery/thumbs/01_b_car.jpg" xpreview="gallery/preview/01_b_car.jpg" />
</a>
<a href="gallery/original/02_o_car.jpg" style="display: inline-block;">
<img class="xzoom-gallery" width="68" src="gallery/thumbs/02_o_car.jpg" xpreview="gallery/preview/02_o_car.jpg" />
</a>
<a href="gallery/original/03_r_car.jpg" style="display: inline-block;">
<img class="xzoom-gallery" width="68" src="gallery/preview/03_r_car.jpg" />
</a>
<a href="gallery/original/04_g_car.jpg" style="display: inline-block;">
<img class="xzoom-gallery" width="68" src="gallery/preview/04_g_car.jpg" />
</a>
</div>
</div>
</body>
</html>