Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: michelled/jquery-ui
...
head fork: michelled/jquery-ui
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 20 additions and 0 deletions.
  1. +20 −0 ui/jquery.ui.widget.js
View
20 ui/jquery.ui.widget.js
@@ -336,4 +336,24 @@ $.Widget.prototype = {
}
};
+$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
+ $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
+ options = options || {};
+ var hasOptions = !$.isEmptyObject( options ),
+ effectName = options.effect || defaultEffect;
+ options.complete = callback;
+
+ if ( hasOptions && $.effects && $.effects[ effectName ] ) {
+ element[ method ]( options );
+ } else if ( hasOptions && element[ effectName ] ) {
+ element[ effectName ]( options.duration, options.easing, callback );
+ } else {
+ element[ method ]();
+ if ( callback ) {
+ callback.call( element[ 0 ] );
+ }
+ }
+ };
+});
+
})( jQuery );

No commit comments for this range

Something went wrong with that request. Please try again.