diff options
author | Scott González <scott.gonzalez@gmail.com> | 2009-04-19 21:19:23 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2009-04-19 21:19:23 +0000 |
commit | 1c2fd6f9ee652d9a375be2e5876ae31ac9c14733 (patch) | |
tree | 8b561c87467c99e67be3d70bb7df5143f700171f /ui/effects.core.js | |
parent | 6061587bdd2fd7046797510ddc4cabe926bc61c4 (diff) | |
download | jquery-ui-1c2fd6f9ee652d9a375be2e5876ae31ac9c14733.tar.gz jquery-ui-1c2fd6f9ee652d9a375be2e5876ae31ac9c14733.zip |
Effects Core: Proper handling for .toggle(true). Fixes #4473 - effects.core corrupts jQuery toggle(<boolean switch>) functionality.
Diffstat (limited to 'ui/effects.core.js')
-rw-r--r-- | ui/effects.core.js | 6 |
1 files 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')); } }, |