Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Effects: Fix show/hide/toggle test for using core functions. Fixed: #…

…5456 - show() function broken with "normal" speed
  • Loading branch information...
commit 2b9d684d1aed0fb50fba916ff8c69be5cc3fa4ae 1 parent 3be1105
Mike Alsup authored August 09, 2010 scottgonzalez committed August 09, 2010

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. 8  ui/jquery.effects.core.js
8  ui/jquery.effects.core.js
@@ -455,7 +455,7 @@ $.fn.extend({
455 455
 
456 456
 	_show: $.fn.show,
457 457
 	show: function(speed) {
458  
-		if (!speed || typeof speed == 'number' || $.fx.speeds[speed]) {
  458
+		if (!speed || typeof speed == 'number' || $.fx.speeds[speed] || !$.effects[speed] ) {
459 459
 			return this._show.apply(this, arguments);
460 460
 		} else {
461 461
 			var args = _normalizeArguments.apply(this, arguments);
@@ -466,7 +466,7 @@ $.fn.extend({
466 466
 
467 467
 	_hide: $.fn.hide,
468 468
 	hide: function(speed) {
469  
-		if (!speed || typeof speed == 'number' || $.fx.speeds[speed]) {
  469
+		if (!speed || typeof speed == 'number' || $.fx.speeds[speed] || !$.effects[speed] ) {
470 470
 			return this._hide.apply(this, arguments);
471 471
 		} else {
472 472
 			var args = _normalizeArguments.apply(this, arguments);
@@ -475,10 +475,10 @@ $.fn.extend({
475 475
 		}
476 476
 	},
477 477
 
478  
-	// jQuery core overloads toggle and create _toggle
  478
+	// jQuery core overloads toggle and creates _toggle
479 479
 	__toggle: $.fn.toggle,
480 480
 	toggle: function(speed) {
481  
-		if (!speed || typeof speed == 'number' || $.fx.speeds[speed] ||
  481
+		if (!speed || typeof speed == 'number' || $.fx.speeds[speed] || !$.effects[speed]  ||
482 482
 			typeof speed == 'boolean' || $.isFunction(speed)) {
483 483
 			return this.__toggle.apply(this, arguments);
484 484
 		} else {

0 notes on commit 2b9d684

Please sign in to comment.
Something went wrong with that request. Please try again.