mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
widget: Updating code for show/hide to use new effects API namespace - DRY'ed out a bit as well
This commit is contained in:
parent
56a1b18246
commit
c9fb452867
13
ui/jquery.ui.widget.js
vendored
13
ui/jquery.ui.widget.js
vendored
@ -365,19 +365,10 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
|
||||
if (options.delay) {
|
||||
element.delay( options.delay );
|
||||
}
|
||||
if ( hasOptions && $.effects && $.effects[ effectName ] ) {
|
||||
if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
|
||||
element[ method ]( options );
|
||||
} else if ( element[ effectName ] ) {
|
||||
if ( /show|hide/.test( effectName ) ) {
|
||||
element.queue( function() {
|
||||
element[ effectName ]();
|
||||
if ( callback ) {
|
||||
callback.call( element[ 0 ] );
|
||||
}
|
||||
});
|
||||
} else {
|
||||
} else if ( effectName !== method && element[ effectName ] ) {
|
||||
element[ effectName ]( options.duration, options.easing, callback );
|
||||
}
|
||||
} else {
|
||||
element.queue( function() {
|
||||
$( this )[ method ]();
|
||||
|
Loading…
Reference in New Issue
Block a user