Skip to content

Commit

Permalink
fix show issue in IE 6. "olddisplay" is sometimes undefined and IE 6 …
Browse files Browse the repository at this point in the history
…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 72cf42b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/fx.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 72cf42b

Please sign in to comment.