aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-10-11 15:11:03 -0400
committerScott González <scott.gonzalez@gmail.com>2010-10-11 15:11:03 -0400
commit22ccbf82c8badd1d46f5ea52a0a7d5f3935a9fca (patch)
treefa692f6b210a3a1d118cbab749e6d31e0e924496 /src/css.js
parent2866f16c09cce43044d721563a7bdbd9170fb494 (diff)
downloadjquery-22ccbf82c8badd1d46f5ea52a0a7d5f3935a9fca.tar.gz
jquery-22ccbf82c8badd1d46f5ea52a0a7d5f3935a9fca.zip
Fixed getting styles from disconnected nodes. Fixes #7148.
Diffstat (limited to 'src/css.js')
-rw-r--r--src/css.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/css.js b/src/css.js
index d0e55db0f..933d2b45e 100644
--- a/src/css.js
+++ b/src/css.js
@@ -230,6 +230,9 @@ if ( getComputedStyle ) {
if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
ret = computedStyle.getPropertyValue( name );
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
}
return ret;