From 1c2fd6f9ee652d9a375be2e5876ae31ac9c14733 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Sun, 19 Apr 2009 21:19:23 +0000 Subject: [PATCH] Effects Core: Proper handling for .toggle(true). Fixes #4473 - effects.core corrupts jQuery toggle() functionality. --- ui/effects.core.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/effects.core.js b/ui/effects.core.js index 8313cd29b..e4f3dc118 100644 --- a/ui/effects.core.js +++ b/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')); } }, -- 2.39.5