From 82e0a5a810f09b601543d3406b65ac15bd22307e Mon Sep 17 00:00:00 2001 From: John Resig Date: Sun, 30 Jul 2006 23:07:00 +0000 Subject: [PATCH] Fixed two bugs with togglling. --- event/event.js | 2 +- fx/fx.js | 8 ++++---- jquery/jquery.js | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/event/event.js b/event/event.js index 3f605e4..9094e73 100644 --- a/event/event.js +++ b/event/event.js @@ -2,7 +2,7 @@ jQuery.fn.extend({ // We're overriding the old toggle function, so // remember it for later - _toggle: jQuery.fn.toggle, + //_toggle: jQuery.fn.toggle, /** * Toggle between two function calls every other click. diff --git a/fx/fx.js b/fx/fx.js index 184765b..1929388 100644 --- a/fx/fx.js +++ b/fx/fx.js @@ -1,7 +1,7 @@ jQuery.fn.extend({ // overwrite the old show method - _show: jQuery.fn.show, + //_show: jQuery.fn.show, /** * Show all matched elements using a graceful animation. @@ -37,7 +37,7 @@ jQuery.fn.extend({ }, // Overwrite the old hide method - _hide: jQuery.fn.hide, + //_hide: jQuery.fn.hide, /** * Hide all matched elements using a graceful animation. @@ -440,8 +440,8 @@ jQuery.extend({ z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out - if ( z.el.oldOverlay == "visible" ) - y.overflow = "hidden"; + //if ( z.el.oldOverlay == "visible" ) + y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ diff --git a/jquery/jquery.js b/jquery/jquery.js index 8be00be..369ff88 100644 --- a/jquery/jquery.js +++ b/jquery/jquery.js @@ -748,8 +748,8 @@ jQuery.extend({ jQuery.fn[ i ] = function(){ var a = arguments; return this.each(function(){ - for ( var i = 0; i < a.length; i++ ) - $(a[i])[n]( this ); + for ( var j = 0; j < a.length; j++ ) + $(a[j])[n]( this ); }); }; }); @@ -2137,7 +2137,7 @@ jQuery.macros = { * @name show * @type jQuery */ - show: function(){ + _show: function(){ this.style.display = this.oldblock ? this.oldblock : ""; if ( jQuery.css(this,"display") == "none" ) this.style.display = "block"; @@ -2153,7 +2153,7 @@ jQuery.macros = { * @name hide * @type jQuery */ - hide: function(){ + _hide: function(){ this.oldblock = this.oldblock || jQuery.css(this,"display"); if ( this.oldblock == "none" ) this.oldblock = "block"; @@ -2172,7 +2172,7 @@ jQuery.macros = { * @name toggle * @type jQuery */ - toggle: function(){ + _toggle: function(){ var d = jQuery.css(this,"display"); $(this)[ !d || d == "none" ? "show" : "hide" ](); }, @@ -2335,4 +2335,4 @@ jQuery.macros = { jQuery.event.trigger( type, data, this ); } } -}; \ No newline at end of file +}; -- 1.7.10.4