r2480 - Effects Core: Proper handling for .toggle(true). Fixes #4473 - effects.core corrupts jQu...
Author: scott.gonzalez
Date: Sun Apr 19 14:19:23 2009
New Revision: 2480
Modified:
trunk/ui/effects.core.js
Log:
Effects Core: Proper handling for .toggle(true). Fixes #4473 -
effects.core corrupts jQuery toggle(<boolean switch>) functionality.
Modified: trunk/ui/effects.core.js
==============================================================================
--- trunk/ui/effects.core.js (original)
+++ trunk/ui/effects.core.js Sun Apr 19 14:19:23 2009
@@ -175,9 +175,11 @@
},
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'));
}
},