Skip to content

Commit

Permalink
Effects: Fix show/hide/toggle test for using core functions. Fixed: #…
Browse files Browse the repository at this point in the history
…5456 - show() function broken with "normal" speed
  • Loading branch information
malsup authored and scottgonzalez committed Aug 8, 2010
1 parent 3be1105 commit 2b9d684
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/jquery.effects.core.js
Expand Up @@ -455,7 +455,7 @@ $.fn.extend({

_show: $.fn.show,
show: function(speed) {
if (!speed || typeof speed == 'number' || $.fx.speeds[speed]) {
if (!speed || typeof speed == 'number' || $.fx.speeds[speed] || !$.effects[speed] ) {
return this._show.apply(this, arguments);
} else {
var args = _normalizeArguments.apply(this, arguments);
Expand All @@ -466,7 +466,7 @@ $.fn.extend({

_hide: $.fn.hide,
hide: function(speed) {
if (!speed || typeof speed == 'number' || $.fx.speeds[speed]) {
if (!speed || typeof speed == 'number' || $.fx.speeds[speed] || !$.effects[speed] ) {
return this._hide.apply(this, arguments);
} else {
var args = _normalizeArguments.apply(this, arguments);
Expand All @@ -475,10 +475,10 @@ $.fn.extend({
}
},

// jQuery core overloads toggle and create _toggle
// jQuery core overloads toggle and creates _toggle
__toggle: $.fn.toggle,
toggle: function(speed) {
if (!speed || typeof speed == 'number' || $.fx.speeds[speed] ||
if (!speed || typeof speed == 'number' || $.fx.speeds[speed] || !$.effects[speed] ||
typeof speed == 'boolean' || $.isFunction(speed)) {
return this.__toggle.apply(this, arguments);
} else {
Expand Down

0 comments on commit 2b9d684

Please sign in to comment.