mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Effects (fade): Delegate hiding and showing to core. Fixes #8267 - dialog fadein broken since 1.9m4.
This commit is contained in:
parent
e2bbe04bc7
commit
d569b52838
15
ui/jquery.effects.fade.js
vendored
15
ui/jquery.effects.fade.js
vendored
@ -14,23 +14,16 @@
|
|||||||
|
|
||||||
$.effects.effect.fade = function( o, done ) {
|
$.effects.effect.fade = function( o, done ) {
|
||||||
var el = $( this ),
|
var el = $( this ),
|
||||||
mode = $.effects.setMode( el, o.mode || "toggle" ),
|
mode = $.effects.setMode( el, o.mode || "toggle" );
|
||||||
hide = mode === "hide";
|
|
||||||
|
|
||||||
el.show();
|
|
||||||
el.animate({
|
el.animate({
|
||||||
opacity: hide ? 0 : 1
|
opacity: mode
|
||||||
}, {
|
}, {
|
||||||
queue: false,
|
queue: false,
|
||||||
duration: o.duration,
|
duration: o.duration,
|
||||||
easing: o.easing,
|
easing: o.easing,
|
||||||
complete: function() {
|
complete: done
|
||||||
if ( hide ) {
|
|
||||||
el.hide();
|
|
||||||
}
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
})(jQuery);
|
})( jQuery );
|
||||||
|
Loading…
Reference in New Issue
Block a user