patch - jQuery toggle(<boolean switch>)

patch - jQuery toggle(<boolean switch>)


Hello!
I have problems with jQuery UI Trac (I informed Paul about them), so I
write it just here:
effects.core.js corrupts jQuery toggle(<boolean switch>)
functionality.
toggle(false) works, but toggle(true) doesn't.
A simple patch:
Index: effects.core.js
===================================================================
--- effects.core.js    (revision 2449)
+++ effects.core.js    (working copy)
@@ -175,7 +175,7 @@
    },
    toggle: function(){
-        if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|
normal|fast)/).test(arguments[0])) || (arguments[0].constructor ==
Function))
+        if(!arguments[0] || arguments[0] === true || (arguments
[0].constructor == Number || (/(slow|normal|fast)/).test(arguments
[0])) || (arguments[0].constructor == Function))
            return this.__toggle.apply(this, arguments);
        else {
            return this.effect.apply(this, _normalizeArguments(arguments,
'toggle'));
George