Skip to content
Permalink
Browse files

widget: Updating code for show/hide to use new effects API namespace …

…- DRY'ed out a bit as well
  • Loading branch information...
gnarf committed May 2, 2011
1 parent 56a1b18 commit c9fb4528673f94a3aa338d113b9ebb72f346b900
Showing with 3 additions and 12 deletions.
  1. +3 −12 ui/jquery.ui.widget.js
@@ -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 {
element[ effectName ]( options.duration, options.easing, callback );
}
} else if ( effectName !== method && element[ effectName ] ) {
element[ effectName ]( options.duration, options.easing, callback );
} else {
element.queue( function() {
$( this )[ method ]();

0 comments on commit c9fb452

Please sign in to comment.
You can’t perform that action at this time.