From: Brandon Aaron Date: Mon, 16 Feb 2009 21:20:51 +0000 (+0000) Subject: fix show issue in IE 6. "olddisplay" is sometimes undefined and IE 6 does not like... X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=commitdiff_plain;h=72cf42bcbd4f7dc351d313c65d8bce113981d159 fix show issue in IE 6. "olddisplay" is sometimes undefined and IE 6 does not like setting style.display to undefined. also second for loop was mistakenly nested within the first for loop. --- diff --git a/src/fx.js b/src/fx.js index 724e21f..c949bdc 100644 --- a/src/fx.js +++ b/src/fx.js @@ -46,12 +46,12 @@ jQuery.fn.extend({ jQuery.data(this[i], "olddisplay", display); } + } - // Set the display of the elements in a second loop - // to avoid the constant reflow - for ( var i = 0, l = this.length; i < l; i++ ){ - this[i].style.display = jQuery.data(this[i], "olddisplay"); - } + // Set the display of the elements in a second loop + // to avoid the constant reflow + for ( var i = 0, l = this.length; i < l; i++ ){ + this[i].style.display = jQuery.data(this[i], "olddisplay") || ""; } return this;