Skip to content
Permalink
Browse files

fix effects tests failure

  • Loading branch information...
mikesherov authored and dmethvin committed Oct 16, 2012
1 parent 6aae3e1 commit d70e64bff2660cf5a801fe818f1170d5ea93e4fe
Showing with 8 additions and 8 deletions.
  1. +0 −4 src/css.js
  2. +7 −1 src/deprecated.js
  3. +1 −3 src/effects.js
@@ -116,10 +116,6 @@ jQuery.fn.extend({
toggle: function( state, fn2 ) {
var bool = typeof state === "boolean";

if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) {
return eventsToggle.apply( this, arguments );
}

return this.each(function() {
if ( bool ? state : isHidden( this ) ) {
jQuery( this ).show();
@@ -60,7 +60,13 @@ jQuery.sub = function() {
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
var args = arguments,
guid = fn.guid || jQuery.guid++,
@@ -445,9 +445,7 @@ Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
var cssFn = jQuery.fn[ name ];
jQuery.fn[ name ] = function( speed, easing, callback ) {
return speed == null || typeof speed === "boolean" ||
// special check for .toggle( handler, handler, ... )
( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ?
return speed == null || typeof speed === "boolean" ?
cssFn.apply( this, arguments ) :
this.animate( genFx( name, true ), speed, easing, callback );
};

0 comments on commit d70e64b

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