diff options
author | louisremi <louisremi@louisremi-laptop.(none)> | 2011-03-01 00:54:15 +0100 |
---|---|---|
committer | louisremi <louisremi@louisremi-laptop.(none)> | 2011-03-01 00:54:15 +0100 |
commit | 025f2c63e487e069215b2a03ded2b98198904af9 (patch) | |
tree | 0dead8537cd929551de8933974448dfd2f9eaf8d /src/css.js | |
parent | 71bd828d9f975fb1047b9fa2a78949cafd8006ac (diff) | |
download | jquery-025f2c63e487e069215b2a03ded2b98198904af9.tar.gz jquery-025f2c63e487e069215b2a03ded2b98198904af9.zip |
fixing both #8403 and #8401: jQuery \"bulldozes\" other IE filters when setting opacity
Diffstat (limited to 'src/css.js')
-rw-r--r-- | src/css.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/css.js b/src/css.js index 8a982312f..9fdba3b7b 100644 --- a/src/css.js +++ b/src/css.js @@ -221,7 +221,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 @@ -231,11 +232,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; } }; } |