Fixed two bugs with togglling.
This commit is contained in:
parent
879225b3ae
commit
82e0a5a810
|
@ -2,7 +2,7 @@ jQuery.fn.extend({
|
||||||
|
|
||||||
// We're overriding the old toggle function, so
|
// We're overriding the old toggle function, so
|
||||||
// remember it for later
|
// remember it for later
|
||||||
_toggle: jQuery.fn.toggle,
|
//_toggle: jQuery.fn.toggle,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggle between two function calls every other click.
|
* Toggle between two function calls every other click.
|
||||||
|
|
6
fx/fx.js
6
fx/fx.js
|
@ -1,7 +1,7 @@
|
||||||
jQuery.fn.extend({
|
jQuery.fn.extend({
|
||||||
|
|
||||||
// overwrite the old show method
|
// overwrite the old show method
|
||||||
_show: jQuery.fn.show,
|
//_show: jQuery.fn.show,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show all matched elements using a graceful animation.
|
* Show all matched elements using a graceful animation.
|
||||||
|
@ -37,7 +37,7 @@ jQuery.fn.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
// Overwrite the old hide method
|
// Overwrite the old hide method
|
||||||
_hide: jQuery.fn.hide,
|
//_hide: jQuery.fn.hide,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide all matched elements using a graceful animation.
|
* Hide all matched elements using a graceful animation.
|
||||||
|
@ -440,7 +440,7 @@ jQuery.extend({
|
||||||
z.el.oldOverflow = jQuery.css( z.el, "overflow" );
|
z.el.oldOverflow = jQuery.css( z.el, "overflow" );
|
||||||
|
|
||||||
// Make sure that nothing sneaks out
|
// Make sure that nothing sneaks out
|
||||||
if ( z.el.oldOverlay == "visible" )
|
//if ( z.el.oldOverlay == "visible" )
|
||||||
y.overflow = "hidden";
|
y.overflow = "hidden";
|
||||||
|
|
||||||
// Each step of an animation
|
// Each step of an animation
|
||||||
|
|
10
jquery/jquery.js
vendored
10
jquery/jquery.js
vendored
|
@ -748,8 +748,8 @@ jQuery.extend({
|
||||||
jQuery.fn[ i ] = function(){
|
jQuery.fn[ i ] = function(){
|
||||||
var a = arguments;
|
var a = arguments;
|
||||||
return this.each(function(){
|
return this.each(function(){
|
||||||
for ( var i = 0; i < a.length; i++ )
|
for ( var j = 0; j < a.length; j++ )
|
||||||
$(a[i])[n]( this );
|
$(a[j])[n]( this );
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -2137,7 +2137,7 @@ jQuery.macros = {
|
||||||
* @name show
|
* @name show
|
||||||
* @type jQuery
|
* @type jQuery
|
||||||
*/
|
*/
|
||||||
show: function(){
|
_show: function(){
|
||||||
this.style.display = this.oldblock ? this.oldblock : "";
|
this.style.display = this.oldblock ? this.oldblock : "";
|
||||||
if ( jQuery.css(this,"display") == "none" )
|
if ( jQuery.css(this,"display") == "none" )
|
||||||
this.style.display = "block";
|
this.style.display = "block";
|
||||||
|
@ -2153,7 +2153,7 @@ jQuery.macros = {
|
||||||
* @name hide
|
* @name hide
|
||||||
* @type jQuery
|
* @type jQuery
|
||||||
*/
|
*/
|
||||||
hide: function(){
|
_hide: function(){
|
||||||
this.oldblock = this.oldblock || jQuery.css(this,"display");
|
this.oldblock = this.oldblock || jQuery.css(this,"display");
|
||||||
if ( this.oldblock == "none" )
|
if ( this.oldblock == "none" )
|
||||||
this.oldblock = "block";
|
this.oldblock = "block";
|
||||||
|
@ -2172,7 +2172,7 @@ jQuery.macros = {
|
||||||
* @name toggle
|
* @name toggle
|
||||||
* @type jQuery
|
* @type jQuery
|
||||||
*/
|
*/
|
||||||
toggle: function(){
|
_toggle: function(){
|
||||||
var d = jQuery.css(this,"display");
|
var d = jQuery.css(this,"display");
|
||||||
$(this)[ !d || d == "none" ? "show" : "hide" ]();
|
$(this)[ !d || d == "none" ? "show" : "hide" ]();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue