Skip to content
Permalink
Browse files

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.
  • Loading branch information
brandonaaron committed Feb 16, 2009
1 parent f93df73 commit 72cf42bcbd4f7dc351d313c65d8bce113981d159
Showing with 5 additions and 5 deletions.
  1. +5 −5 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;

0 comments on commit 72cf42b

Please sign in to comment.
You can’t perform that action at this time.