diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-08-27 17:23:30 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-08-27 17:23:30 -0400 |
commit | 96cabd59ab31d853deb9461c62ecd00b9fae0402 (patch) | |
tree | bf37ccf0c5466d2918397d058d271609154f4305 /ui | |
parent | 93556a8e18be972d487498a42b3916f8fff9e995 (diff) | |
download | jquery-ui-96cabd59ab31d853deb9461c62ecd00b9fae0402.tar.gz jquery-ui-96cabd59ab31d853deb9461c62ecd00b9fae0402.zip |
Effects: Cleanup.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.effect.js | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/ui/jquery.ui.effect.js b/ui/jquery.ui.effect.js index d362ca017..8ad9b34e3 100644 --- a/ui/jquery.ui.effect.js +++ b/ui/jquery.ui.effect.js @@ -831,37 +831,42 @@ $.fn.extend({ _addClass: $.fn.addClass, addClass: function( classNames, speed, easing, callback ) { return speed ? - $.effects.animateClass.apply( this, [{ add: classNames }, speed, easing, callback ]) : - this._addClass(classNames); + $.effects.animateClass.call( this, + { add: classNames }, speed, easing, callback ) : + this._addClass( classNames ); }, _removeClass: $.fn.removeClass, removeClass: function( classNames, speed, easing, callback ) { return speed ? - $.effects.animateClass.apply( this, [{ remove: classNames }, speed, easing, callback ]) : - this._removeClass(classNames); + $.effects.animateClass.call( this, + { remove: classNames }, speed, easing, callback ) : + this._removeClass( classNames ); }, _toggleClass: $.fn.toggleClass, toggleClass: function( classNames, force, speed, easing, callback ) { if ( typeof force === "boolean" || force === undefined ) { if ( !speed ) { - // without speed parameter; + // without speed parameter return this._toggleClass( classNames, force ); } else { - return $.effects.animateClass.apply( this, [( force ? { add:classNames } : { remove:classNames }), speed, easing, callback ]); + return $.effects.animateClass.call( this, + (force ? { add: classNames } : { remove: classNames }), + speed, easing, callback ); } } else { - // without force parameter; - return $.effects.animateClass.apply( this, [{ toggle: classNames }, force, speed, easing ]); + // without force parameter + return $.effects.animateClass.call( this, + { toggle: classNames }, force, speed, easing ); } }, switchClass: function( remove, add, speed, easing, callback) { - return $.effects.animateClass.apply( this, [{ - add: add, - remove: remove - }, speed, easing, callback ]); + return $.effects.animateClass.call( this, { + add: add, + remove: remove + }, speed, easing, callback ); } }); |