Skip to content
Permalink
Browse files

Effects Core: Proper handling for .toggle(true). Fixes #4473 - effect…

…s.core corrupts jQuery toggle(<boolean switch>) functionality.
  • Loading branch information...
scottgonzalez committed Apr 19, 2009
1 parent 6061587 commit 1c2fd6f9ee652d9a375be2e5876ae31ac9c14733
Showing with 4 additions and 2 deletions.
  1. +4 −2 ui/effects.core.js
@@ -175,9 +175,11 @@ $.fn.extend({
},

toggle: function(){
if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])) || (arguments[0].constructor == Function))
if(!arguments[0] ||
(arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])) ||
($.isFunction(arguments[0]) || typeof arguments[0] == 'boolean')) {
return this.__toggle.apply(this, arguments);
else {
} else {
return this.effect.apply(this, _normalizeArguments(arguments, 'toggle'));
}
},

0 comments on commit 1c2fd6f

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