-
Notifications
You must be signed in to change notification settings - Fork 18
/
test.html
81 lines (62 loc) · 2.04 KB
/
test.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
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html>
<head>
<title>Images grid test</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- jQuery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>-->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>-->
<script>console.log('jQuery: ' + $.fn.jquery);</script>
<!-- Imageg grid -->
<script src="src/images-grid.js"></script>
<link rel="stylesheet" href="src/images-grid.css">
<style>
body {
font-family: sans-serif;
}
p {
text-align: center;
margin: 10px;
font-weight: bold;
font-size: 12px;
}
</style>
</head>
<body>
<p>1 image</p>
<div id="gallery-1"></div>
<p>2 images</p>
<div id="gallery-2"></div>
<p>3 images</p>
<div id="gallery-3"></div>
<p>4 images</p>
<div id="gallery-4"></div>
<p>5 images</p>
<div id="gallery-5"></div>
<p>6 images</p>
<div id="gallery-6"></div>
<p>More than 6 images</p>
<div id="gallery-7"></div>
<script>
// Change default cells count from 5 to 6
$.fn.imagesGrid.defaults.cells = 6;
var images = [
'imgs/1.jpg',
'imgs/2.jpg',
'imgs/3.jpg',
'imgs/4.jpg',
'imgs/5.jpg',
'imgs/6.jpg',
'imgs/7.jpg',
];
for (var i = 0; i < images.length; ++i) {
$('#gallery-' + (i + 1)).imagesGrid({
images: images.slice(0, (i + 1)),
align: true
});
}
</script>
</body>
</html>