diff options
author | Colin Snover <github.com@zetafleet.com> | 2010-10-11 15:22:43 -0500 |
---|---|---|
committer | Colin Snover <github.com@zetafleet.com> | 2010-10-11 15:22:43 -0500 |
commit | 5646a4feee87b086fa4752373422622d54a8430d (patch) | |
tree | b3911ea31ac66d8f926d931971f48cc3c670e586 /src | |
parent | 2866f16c09cce43044d721563a7bdbd9170fb494 (diff) | |
download | jquery-5646a4feee87b086fa4752373422622d54a8430d.tar.gz jquery-5646a4feee87b086fa4752373422622d54a8430d.zip |
Fix olddisplay was inappropriately set when calling hide on an already hidden element. Fixes #7141.
Diffstat (limited to 'src')
-rw-r--r-- | src/effects.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/effects.js b/src/effects.js index 241dbd036..8662df5b9 100644 --- a/src/effects.js +++ b/src/effects.js @@ -49,9 +49,10 @@ jQuery.fn.extend({ } else { for ( var i = 0, j = this.length; i < j; i++ ) { - var old = jQuery.data(this[i], "olddisplay"); - if ( !old ) { - jQuery.data( this[i], "olddisplay", jQuery.css( this[i], "display" ) ); + var display = jQuery.css( this[i], "display" ); + + if ( display !== "none" ) { + jQuery.data( this[i], "olddisplay", display ); } } |