aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2011-04-12 00:35:51 -0400
committerjeresig <jeresig@gmail.com>2011-04-12 00:35:51 -0400
commit430d9e0b066512f00ceb7573249b45747d7792ff (patch)
tree14901b041b69dfee6bdc4ef3319ed885c02e5737 /src/css.js
parent7bfb6a7dd315f0eda3e5227f7d41e38f66f46549 (diff)
parent581fa824200448361be534680a920d8144476aa7 (diff)
downloadjquery-430d9e0b066512f00ceb7573249b45747d7792ff.tar.gz
jquery-430d9e0b066512f00ceb7573249b45747d7792ff.zip
Merge branch 'fix_8403' of https://github.com/lrbabe/jquery into lrbabe-fix_8403
Diffstat (limited to 'src/css.js')
-rw-r--r--src/css.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/css.js b/src/css.js
index 65ec20f57..f764f321f 100644
--- a/src/css.js
+++ b/src/css.js
@@ -231,7 +231,8 @@ if ( !jQuery.support.opacity ) {
},
set: function( elem, value ) {
- var style = elem.style;
+ var style = elem.style,
+ currentStyle = elem.currentStyle;
// IE has trouble with opacity if it does not have layout
// Force it by setting the zoom level
@@ -241,11 +242,11 @@ if ( !jQuery.support.opacity ) {
var opacity = jQuery.isNaN(value) ?
"" :
"alpha(opacity=" + value * 100 + ")",
- filter = style.filter || "";
+ filter = currentStyle && currentStyle.filter || style.filter || "";
style.filter = ralpha.test(filter) ?
filter.replace(ralpha, opacity) :
- style.filter + ' ' + opacity;
+ filter + " " + opacity;
}
};
}