Skip to content

Commit 72cf42b

Browse files
committed
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.
1 parent f93df73 commit 72cf42b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/fx.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ jQuery.fn.extend({
4646

4747
jQuery.data(this[i], "olddisplay", display);
4848
}
49+
}
4950

50-
// Set the display of the elements in a second loop
51-
// to avoid the constant reflow
52-
for ( var i = 0, l = this.length; i < l; i++ ){
53-
this[i].style.display = jQuery.data(this[i], "olddisplay");
54-
}
51+
// Set the display of the elements in a second loop
52+
// to avoid the constant reflow
53+
for ( var i = 0, l = this.length; i < l; i++ ){
54+
this[i].style.display = jQuery.data(this[i], "olddisplay") || "";
5555
}
5656

5757
return this;

0 commit comments

Comments
 (0)