aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorColin Snover <github.com@zetafleet.com>2010-10-11 15:22:43 -0500
committerColin Snover <github.com@zetafleet.com>2010-10-11 15:22:43 -0500
commit5646a4feee87b086fa4752373422622d54a8430d (patch)
treeb3911ea31ac66d8f926d931971f48cc3c670e586 /src
parent2866f16c09cce43044d721563a7bdbd9170fb494 (diff)
downloadjquery-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.js7
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 );
}
}