diff options
Diffstat (limited to 'ui/jquery.ui.widget.js')
-rw-r--r-- | ui/jquery.ui.widget.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index 1b7405e28..3e3723398 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -9,9 +9,8 @@ */ (function( $, undefined ) { -var slice = Array.prototype.slice; - -var _cleanData = $.cleanData; +var slice = Array.prototype.slice, + _cleanData = $.cleanData; $.cleanData = function( elems ) { for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { try { @@ -73,11 +72,11 @@ $.widget = function( name, base, prototype ) { if ( $.isFunction( value ) ) { prototype[ prop ] = (function() { var _super = function() { - return base.prototype[ prop ].apply( this, arguments ); - }; - var _superApply = function( args ) { - return base.prototype[ prop ].apply( this, args ); - }; + return base.prototype[ prop ].apply( this, arguments ); + }, + _superApply = function( args ) { + return base.prototype[ prop ].apply( this, args ); + }; return function() { var __super = this._super, __superApply = this._superApply, @@ -163,7 +162,8 @@ $.widget.bridge = function( name, object ) { if ( isMethodCall ) { this.each(function() { - var instance = $.data( this, fullName ); + var methodValue, + instance = $.data( this, fullName ); if ( !instance ) { return $.error( "cannot call methods on " + name + " prior to initialization; " + "attempted to call method '" + options + "'" ); @@ -171,7 +171,7 @@ $.widget.bridge = function( name, object ) { if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { return $.error( "no such method '" + options + "' for " + name + " widget instance" ); } - var methodValue = instance[ options ].apply( instance, args ); + methodValue = instance[ options ].apply( instance, args ); if ( methodValue !== instance && methodValue !== undefined ) { returnValue = methodValue && methodValue.jquery ? returnValue.pushStack( methodValue.get() ) : |