-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinflate.html
More file actions
214 lines (211 loc) · 9.88 KB
/
Copy pathinflate.html
File metadata and controls
214 lines (211 loc) · 9.88 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="keywords" content="inflate,inflate.js,inflateJS,jquery,javascript">
<meta itemprop="description" name="description" content="Inflate JS is library for creating cool mouse over inflating effect.">
<meta property="og:type" content="article"/>
<meta property="og:title" content="Inflate JS"/>
<meta property="og:description" content="Inflate JS is library for creating cool mouse over inflating effect.">
<meta property="og:url" content="https://raw.githubusercontent.com/Manish2612/Inflate/master/inflate.html"/>
<link href="Asset/img/fav.png" rel="shortcut icon" type="image/x-icon">
<link href="Asset/css/style.css" type="text/css" rel="stylesheet">
<link href="Asset/css/hybrid.css" type="text/css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<title>Inflate JS</title>
</head>
<body>
<header>
<div class="container">
<div class="float-right">
<a href="https://github.com/Manish2612/Inflate" class="download"><i class="fa fa-github"></i> Github</a>
</div>
<a href="#" class="title">InflateJS</a>
</div>
</header>
<section class="js-info">
<div class="container" >
Inflate.js is library helps to create animated inflating effect on mouse over event. You can customize size of grid and apply this
effect to n*n grid. It also allows you to use different easing for inflating effect with the help of <a target="_blank" href="https://github.com/greensock/GreenSock-JS">TweenMax.js</a> library.
</div>
</section>
<section>
<div class="container js-note" >
<div class="">
As this library is created specifically for mouse over event, you need to open this webpage in desktop to see Demo.
</div>
</div>
</section>
<section class="visible-grid">
<div class="wrapper">
<ul class="tiles">
<li class="tile">
<img src="Asset/img/Images/Cute-Agnes-Gru-Despicable-Me.jpg">
</li>
<li class="tile">
<img src="Asset/img/Images/Despicable-Me-Minions-Wallpaper-For-Android-2.jpg">
</li>
<li class="tile">
<img src="Asset/img/Images/big-hero-six.jpg">
</li>
<li class="tile">
<img src="Asset/img/Images/How-to-Train-Your-Dragon-image-how-to-train-your-dragon-36801794-800-430.jpg">
</li>
<li class="tile">
<img src="Asset/img/Images/Kung-Fu-Panda-3.jpg">
</li>
<li class="tile">
<img src="Asset/img/Images/JABSG.jpg">
</li>
<li class="tile">
<img src="Asset/img/Images/Kungfupanda4.jpg">
</li>
<li class="tile">
<img src="Asset/img/Images/NE7UrNsWkAKxbb_1_a.jpg">
</li>
<li class="tile">
<img src="Asset/img/Images/Tigress-cub.jpg">
</li>
<li class="tile">
<img src="Asset/img/Images/kfp-3-reasons-kung-fu-panda-3-is-important.jpg">
</li>
<li class="tile">
<img src="Asset/img/Images/how_to_train_your_dragon_2-wallpaper-hd1.jpg">
</li>
<li class="tile">
<img src="Asset/img/Images/braveweb.jpg">
</li>
</ul>
</div>
</section>
<section class="usage">
<div class="container">
<div class="help">
<div class="title">
Installation
</div>
<div class="content">
<div class="row">
Include the core library and <code>TweenMax.js</code> in your HTML file after jquery library:
</div>
<div class="row code">
<div><script src="jquery-1.11.1.min.js"/> </script></div>
<div><script src="TweenMax.js"/> </script></div>
<div><script src="Inflate.js"/> </script></div>
</div>
<div class="row">
And you're ready to go!
</div>
</div>
</div>
</div>
<div class="container">
<div class="help">
<div class="title">
Usage
</div>
<div class="content">
<div class="row">
<div class="sec-h">The Markup</div>
For markup we'll have <code><ul></code> with class "tile-wrapper" which contains <code><li></code> with class "tile" styled as square tile.
You could as well use <code><div></code>
here which would need different markup.
</div>
<div class="row code">
<pre>
<ul class="tile-wrapper">
<li class="tile">
...
</li>
...
</ul>
</pre>
</div>
<div class="row">
Let's style all this.
<br><br>
<div class="sec-h">The CSS</div>
We'll start with grid which will contain 4 columns. Lets center it and and set width
960px since we'll be creating tiles each of width 240px. To make this grid responsive we'll take care
of smaller screen sizes in our media queries later on:
</div>
<div class="row code">
<pre>
.tile-wrapper{
list-style: none;
margin: 0 auto;
width: 960px;
}
</pre>
</div>
<div class="row">
The tiles should float left and we'll give them width of 240px and height of 240px. In order to make
inflating tiles work we have to set its <code>transform-origin</code> to 0px:
</div>
<div class="row code">
<pre>
.tile{
float: left;
height:240px;
transform-origin: 0px 0px;
width:240px;
}
</pre>
</div>
<div class="row">
That's all the style! Let's move over to the Javascript.
<br><br>
<div class="sec-h">The Javascript</div>
Here's where we make stuff happen. As all HTML and CSS is in place, all we have to do is call
inflate function to start inflating tiles effect.
</div>
<div class="row code">
<pre>
$(".tile-wrapper").inflate({
elements: ".tile",
easing: Back.easeOut,
scale: 40
});
</pre>
</div>
<div class="row last">
Lets go over what these vars do.
<table>
<tbody>
<tr>
<td>elements</td>
<td>selector for tile</td>
</tr>
<tr>
<td>easing</td>
<td><a href="http://greensock.com/ease-visualizer" target="_blank">timing function</a> for inflation effect</td>
</tr>
<tr>
<td>scale</td>
<td>scale amout for tile</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
<footer class="footer">
<div class="container">
Licensed under <a href=-"https://github.com/Manish2612/Inflate/blob/master/LICENSE.md">the MIT License</a>.
<a style="float:right" target="_blank" href="https://www.linkedin.com/in/manishmahajan26">Author</a>
</div>
</footer>
<script src="Asset/js/jquery-1.11.1.min.js"></script>
<script src="Asset/js/TweenMax.js"></script>
<script src="Asset/js/Inflate.js"></script>
<script src="Asset/js/highlight.pack.js"></script>
<script src='Asset/js/index.js'></script>
</body>
</html>