You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 5, 2020. It is now read-only.
If you are using Zepto, you need to load `bower_components/velocity/velocity.js` (this file comes with a jQuery shim bundled directly in it). If you are using jQuery, you need to load `bower_components/velocity/jquery.velocity.js`.
23
-
24
-
### jQuery Support
25
-
26
-
Bellows supports jQuery but is not actively developed for it. You should be able to use Bellows directly with jQuery 2.0. While we don't actively support jQuery for Bellows, we welcome any and all issues and PRs to help us make it work.
21
+
Bellows supports Zepto up until v5.1.2 but is not actively developed for it. You should be able to use Bellows directly with Zepto. While we don't actively support Zepto for Bellows, we welcome any and all issues and PRs to help us make it work.
27
22
28
23
29
24
## Installation
30
25
31
-
Bellows can be installed using bower:
26
+
Bellows can be installed using NPM:
32
27
33
28
```
34
-
bower install bellows
29
+
npm install bellows
35
30
```
36
31
37
32
## Usage with Require.js
38
33
39
-
To use with require.js, after installing through bower you merely have to reference bellows in your require config file:
34
+
To use with require.js, after installing through NPM you merely have to reference bellows in your require config file:
Sets the easing for the animation. Bellows takes all of the same easing properties that [Velocity.js](http://julian.com/research/velocity) accepts.
175
170
176
-
> *[jQuery UI's easings](http://easings.net/) and CSS3's easings ("ease", "ease-in", "ease-out", and "ease-in-out"), which are pre-packaged into Velocity. A bonus "spring" easing (sampled in the CSS Support pane) is also included.
177
-
* CSS3's bezier curves: Pass in a four-item array of bezier points. (Refer to [Cubic-Bezier.com](http://cubic-bezier.com/) for crafing custom bezier curves.)
178
-
* Spring physics: Pass a two-item array in the form of [ tension, friction ]. A higher tension (default: 600) increases total speed and bounciness. A lower friction (default: 20) increases ending vibration speed.
179
-
* Step easing: Pass a one-item array in the form of [ steps ]. The animation will jump toward its end values using the specified number of steps.
171
+
> *[jQuery UI's easings](http://easings.net/) and CSS3's easings ("ease", "ease-in", "ease-out", and "ease-in-out"), which are pre-packaged into Velocity. A bonus "spring" easing (sampled in the CSS Support pane) is also included.
172
+
* CSS3's bezier curves: Pass in a four-item array of bezier points. (Refer to [Cubic-Bezier.com](http://cubic-bezier.com/) for crafing custom bezier curves.)
173
+
* Spring physics: Pass a two-item array in the form of [ tension, friction ]. A higher tension (default: 600) increases total speed and bounciness. A lower friction (default: 20) increases ending vibration speed.
174
+
* Step easing: Pass a one-item array in the form of [ steps ]. The animation will jump toward its end values using the specified number of steps.
180
175
181
176
For more information, check out [Velocity's docs on easing](http://julian.com/research/velocity/#easing).
182
177
@@ -197,11 +192,11 @@ Triggered every time the selected bellows item is starting to open.
197
192
| Parameter name | Description |
198
193
|----------------|-------------|
199
194
|**e**| An Event object passed to the callback |
200
-
|**ui**| An object containing any associated data for use inside the callback |
195
+
|**ui**| An object containing any associated data for use inside the callback |
201
196
202
197
```js
203
198
$('.bellows').bellows({
204
-
open:function(e, ui) {
199
+
open:function(e, ui) {
205
200
// ui.item contains the item opening
206
201
}
207
202
});
@@ -218,11 +213,11 @@ Triggered every time the selected bellows item has finished opening.
218
213
| Parameter name | Description |
219
214
|----------------|-------------|
220
215
|**e**| An Event object passed to the callback |
221
-
|**ui**| An object containing any associated data for use inside the callback |
216
+
|**ui**| An object containing any associated data for use inside the callback |
222
217
223
218
```js
224
219
$('.bellows').bellows({
225
-
opened:function(e, ui) {
220
+
opened:function(e, ui) {
226
221
// ui.item contains the item that opened
227
222
}
228
223
});
@@ -237,11 +232,11 @@ Triggered every time an bellows item is starting to close.
237
232
| Parameter name | Description |
238
233
|----------------|-------------|
239
234
|**e**| An Event object passed to the callback |
240
-
|**ui**| An object containing any associated data for use inside the callback |
235
+
|**ui**| An object containing any associated data for use inside the callback |
241
236
242
237
```js
243
238
$('.bellows').bellows({
244
-
close:function(e, ui) {
239
+
close:function(e, ui) {
245
240
// ui.item contains the item closing
246
241
}
247
242
});
@@ -256,11 +251,11 @@ Triggered every time an bellows item is finished closing.
256
251
| Parameter name | Description |
257
252
|----------------|-------------|
258
253
|**e**| An Event object passed to the callback |
259
-
|**ui**| An object containing any associated data for use inside the callback |
254
+
|**ui**| An object containing any associated data for use inside the callback |
260
255
261
256
```js
262
257
$('.bellows').bellows({
263
-
closed:function(e, ui) {
258
+
closed:function(e, ui) {
264
259
// ui.item contains the item that closed
265
260
}
266
261
});
@@ -291,7 +286,7 @@ $bellows.bellows('openAll');
291
286
```
292
287
293
288
### close
294
-
289
+
295
290
Close the selected bellows item by element reference
296
291
297
292
```js
@@ -313,7 +308,7 @@ $bellows.bellows('closeAll');
313
308
```
314
309
315
310
### toggle
316
-
311
+
317
312
Toggle the selected bellows item by element reference
318
313
319
314
```js
@@ -363,7 +358,7 @@ $('.bellows').bellows({
363
358
});
364
359
```
365
360
366
-
This will scroll the viewport to the opened bellows item, restoring its position in the viewport.
361
+
This will scroll the viewport to the opened bellows item, restoring its position in the viewport.
367
362
368
363
## Browser Compatibility
369
364
@@ -382,12 +377,9 @@ This will scroll the viewport to the opened bellows item, restoring its position
The `dist` directory will be populated with minified versions of the css and javascript files for distribution and use with whatever build system you might use. The `src` directory has our raw unminified Sass and Javascript files if you prefer to work with those.
Copy file name to clipboardExpand all lines: examples/animation.html
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ <h1>Bellows Examples</h1>
16
16
17
17
<h2>Different Animation Timings</h2>
18
18
19
-
<p>You can pass Bellows alternate animation <code>duration</code> and <code>easing</code> when you initialize it. The different easings available are described in the readme</p>
19
+
<p>You can pass Bellows alternate animation <code>duration</code> and <code>easing</code> when you initialize it. The different easings available are described in the readme</p>
Copy file name to clipboardExpand all lines: examples/default.html
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,6 @@ <h3>Header</h3>
55
55
56
56
<p>Lorem honeyed locusts sit amet, none so wise, sed do eiusmod never resting ut labore et dolore magna aliqua. Manhood death before disgrace warrior, feed it to the goats spare me your false courtesy commodo consequat. Mace aute irure dolor in reprehenderit poison is a woman's weapon lord of light tower dwarf. The last of the dragons royal, godswood garron sister betrothed officia deserunt mollit anim id est snow.</p>
0 commit comments