18
|
1 |
/*! |
19
|
2 |
* jQuery UI Effects Puff 1.13.1 |
18
|
3 |
* http://jqueryui.com |
|
4 |
* |
|
5 |
* Copyright jQuery Foundation and other contributors |
|
6 |
* Released under the MIT license. |
|
7 |
* http://jquery.org/license |
|
8 |
*/ |
|
9 |
|
|
10 |
//>>label: Puff Effect |
|
11 |
//>>group: Effects |
|
12 |
//>>description: Creates a puff effect by scaling the element up and hiding it at the same time. |
|
13 |
//>>docs: http://api.jqueryui.com/puff-effect/ |
|
14 |
//>>demos: http://jqueryui.com/effect/ |
|
15 |
|
|
16 |
( function( factory ) { |
19
|
17 |
"use strict"; |
|
18 |
|
18
|
19 |
if ( typeof define === "function" && define.amd ) { |
|
20 |
|
|
21 |
// AMD. Register as an anonymous module. |
|
22 |
define( [ |
|
23 |
"jquery", |
|
24 |
"./effect", |
|
25 |
"./effect-scale" |
|
26 |
], factory ); |
|
27 |
} else { |
|
28 |
|
|
29 |
// Browser globals |
|
30 |
factory( jQuery ); |
|
31 |
} |
19
|
32 |
} )( function( $ ) { |
|
33 |
"use strict"; |
18
|
34 |
|
|
35 |
return $.effects.define( "puff", "hide", function( options, done ) { |
|
36 |
var newOptions = $.extend( true, {}, options, { |
|
37 |
fade: true, |
|
38 |
percent: parseInt( options.percent, 10 ) || 150 |
|
39 |
} ); |
|
40 |
|
|
41 |
$.effects.effect.scale.call( this, newOptions, done ); |
|
42 |
} ); |
|
43 |
|
19
|
44 |
} ); |