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:
parent
f93df73a76
commit
72cf42bcbd
1 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue