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.

This commit is contained in:
Brandon Aaron 2009-02-16 21:20:51 +00:00
parent f93df73a76
commit 72cf42bcbd

View file

@ -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;