Commit 72cf42bc authored by Brandon Aaron's avatar Brandon Aaron

fix show issue in IE 6. "olddisplay" is sometimes undefined and IE 6 does not...

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.
parent f93df73a
...@@ -46,12 +46,12 @@ jQuery.fn.extend({ ...@@ -46,12 +46,12 @@ jQuery.fn.extend({
jQuery.data(this[i], "olddisplay", display); jQuery.data(this[i], "olddisplay", display);
} }
}
// Set the display of the elements in a second loop // Set the display of the elements in a second loop
// to avoid the constant reflow // to avoid the constant reflow
for ( var i = 0, l = this.length; i < l; i++ ){ for ( var i = 0, l = this.length; i < l; i++ ){
this[i].style.display = jQuery.data(this[i], "olddisplay"); this[i].style.display = jQuery.data(this[i], "olddisplay") || "";
}
} }
return this; return this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment