2009-11-13 04:35:47 +00:00
|
|
|
/*
|
|
|
|
* jQuery UI Effects Fade @VERSION
|
|
|
|
*
|
2012-03-08 15:53:08 +00:00
|
|
|
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
2010-07-09 13:01:04 +00:00
|
|
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
|
|
* http://jquery.org/license
|
2009-11-13 04:35:47 +00:00
|
|
|
*
|
|
|
|
* http://docs.jquery.com/UI/Effects/Fade
|
|
|
|
*
|
|
|
|
* Depends:
|
|
|
|
* jquery.effects.core.js
|
|
|
|
*/
|
2010-07-13 13:57:58 +00:00
|
|
|
(function( $, undefined ) {
|
2009-11-13 04:35:47 +00:00
|
|
|
|
2011-06-21 06:11:46 +00:00
|
|
|
$.effects.effect.fade = function( o, done ) {
|
2011-06-21 05:23:52 +00:00
|
|
|
var el = $( this ),
|
|
|
|
mode = $.effects.setMode( el, o.mode || "toggle" ),
|
|
|
|
hide = mode === "hide";
|
2009-11-13 04:35:47 +00:00
|
|
|
|
2011-06-21 05:23:52 +00:00
|
|
|
el.show();
|
|
|
|
el.animate({
|
|
|
|
opacity: hide ? 0 : 1
|
|
|
|
}, {
|
|
|
|
queue: false,
|
|
|
|
duration: o.duration,
|
|
|
|
easing: o.easing,
|
|
|
|
complete: function() {
|
|
|
|
if ( hide ) {
|
|
|
|
el.hide();
|
2009-11-13 04:35:47 +00:00
|
|
|
}
|
2011-06-21 06:11:46 +00:00
|
|
|
done();
|
2011-06-21 05:23:52 +00:00
|
|
|
}
|
2009-11-13 04:35:47 +00:00
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
})(jQuery);
|