Commit d70e64bf authored by Mike Sherov's avatar Mike Sherov Committed by Dave Methvin

fix effects tests failure

parent 6aae3e10
...@@ -116,10 +116,6 @@ jQuery.fn.extend({ ...@@ -116,10 +116,6 @@ jQuery.fn.extend({
toggle: function( state, fn2 ) { toggle: function( state, fn2 ) {
var bool = typeof state === "boolean"; var bool = typeof state === "boolean";
if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) {
return eventsToggle.apply( this, arguments );
}
return this.each(function() { return this.each(function() {
if ( bool ? state : isHidden( this ) ) { if ( bool ? state : isHidden( this ) ) {
jQuery( this ).show(); jQuery( this ).show();
......
...@@ -60,7 +60,13 @@ jQuery.sub = function() { ...@@ -60,7 +60,13 @@ jQuery.sub = function() {
return jQuerySub; return jQuerySub;
}; };
jQuery.fn.toggle = function( fn ) { var oldToggle = jQuery.fn.toggle;
jQuery.fn.toggle = function( fn, fn2 ) {
if ( !jQuery.isFunction( fn ) || !jQuery.isFunction( fn2 ) ) {
return oldToggle.apply( this, arguments );
}
// Save reference to arguments for access in closure // Save reference to arguments for access in closure
var args = arguments, var args = arguments,
guid = fn.guid || jQuery.guid++, guid = fn.guid || jQuery.guid++,
......
...@@ -445,9 +445,7 @@ Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { ...@@ -445,9 +445,7 @@ Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
var cssFn = jQuery.fn[ name ]; var cssFn = jQuery.fn[ name ];
jQuery.fn[ name ] = function( speed, easing, callback ) { jQuery.fn[ name ] = function( speed, easing, callback ) {
return speed == null || typeof speed === "boolean" || return speed == null || typeof speed === "boolean" ?
// special check for .toggle( handler, handler, ... )
( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ?
cssFn.apply( this, arguments ) : cssFn.apply( this, arguments ) :
this.animate( genFx( name, true ), speed, easing, callback ); this.animate( genFx( name, true ), speed, easing, callback );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment