| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
( function( factory ) { |
| 17 |
"use strict"; |
| 18 |
|
| 19 |
if ( typeof define === "function" && define.amd ) { |
| 20 |
|
| 21 |
|
| 22 |
define( [ |
| 23 |
"jquery", |
| 24 |
"../version", |
| 25 |
"../effect" |
| 26 |
], factory ); |
| 27 |
} else { |
| 28 |
|
| 29 |
|
| 30 |
factory( jQuery ); |
| 31 |
} |
| 32 |
} )( function( $ ) { |
| 33 |
"use strict"; |
| 34 |
|
| 35 |
return $.effects.define( "fade", "toggle", function( options, done ) { |
| 36 |
var show = options.mode === "show"; |
| 37 |
|
| 38 |
$( this ) |
| 39 |
.css( "opacity", show ? 0 : 1 ) |
| 40 |
.animate( { |
| 41 |
opacity: show ? 1 : 0 |
| 42 |
}, { |
| 43 |
queue: false, |
| 44 |
duration: options.duration, |
| 45 |
easing: options.easing, |
| 46 |
complete: done |
| 47 |
} ); |
| 48 |
} ); |
| 49 |
|
| 50 |
} ); |