-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
106 lines (102 loc) · 3.45 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Ggrid demo page</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link href='http://fonts.googleapis.com/css?family=Fugaz+One' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Share' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/demo.css">
<link rel="stylesheet" href="css/gGrid.css">
</head>
<body>
<!--<div id="header" class="css3gradient">
<span><h1>Ggrid Image Fader</h1></span>
<span>by Gordan Dzinovic</span>
</div>-->
<div id="container">
<div id="grids">
<img src="img/1.jpg" class="gGrid">
<img src="img/2.jpg" class="gGrid">
<img src="img/3.jpg" class="gGrid">
<img src="img/4.jpg" class="gGrid">
<img src="img/5.jpg" class="gGrid">
<img src="img/6.jpg" class="gGrid">
<img src="img/7.jpg" class="gGrid">
<img src="img/8.jpg" class="gGrid">
<div style="width: 100%; z-index: 1000">
<div id="doc" class="doc">
<div id="docContent">
<h2 id="documentation" data-expanded="false">Show documentation</h2><br/>
<h2>Overview</h2>
<br/>
Ggrid is a jQuery plugin that replaces selected pictures by a grid system that fades in cell by cell using CSS3 transitions.
<br/>
<h2>Linkage</h2>
<br/>
Link CSS & JS files to your page :
<span>
<link rel="stylesheet" href="css/gGrid.css"><br/>
<script src="js/jquery.imagesloaded.min.js"></script><br/>
<script src="js/jQuery.gGrid.min.js"></script>
</span>
<h2>Markup</h2>
<br/>
<span>
<img src="bg2.jpg" class="gGrid">
</span>
<h2>Call</h2>
<br/>
<span>
$('img.gGrid').imagesLoaded(function() {<br/>
$('img.gGrid').gGrid();<br/>
});
</span>
<h2>Options</h2>
<br/>
<span>
<b>minDelay</b> (default : 0) : minimal delay of the next fadein transition in the row<br/>
<b>maxDelay</b>(default : 1.5) : maximal delay of the next fadein transition in the row<br/>
<b>cellPerRow</b> (default : 8) : number of cells per row
</span>
Exemple:<br/>
<span>
$('img.gGrid').gGrid({minDelay: 0.5, maxDelay: 1.5});
</span>
Markup configuration:<br/>
<span>
<img src="bg.jpg" class="gGrid" data-cell="7">
</span>
</div>
</div>
</div>
<!-- Javascript -->
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/jquery.imagesloaded.min.js"></script>
<script src="js/jQuery.gGrid.js"></script>
<script type="text/javascript">
$('img.gGrid').imagesLoaded(function() {
$('img.gGrid').gGrid({minDelay: 0.1, maxDelay: 1, cellPerRow: 15, fadeDuration: .5});
});
var docHeight;
$('#documentation').on('click', function () {
$this = $(this);
$documentation = $('#doc');
if($this.data('expanded') == 'true'){
$documentation.height('50px');
$this.html('Show documentation');
$this.data('expanded', 'false');
}else{
$documentation.height(docHeight+'px');
$this.html('Hide documentation');
$this.data('expanded', 'true');
}
})
$(function() {
docHeight = $('#doc').height() + (parseInt($('#docContent').css('padding-top')) * 3);
$('#doc').height('50px');
});
</script>
</body>
</html>