Permalink
Browse files

fixing both #8403 and #8401: jQuery \"bulldozes\" other IE filters wh…

…en setting opacity
  • Loading branch information...
louisremi
louisremi committed Feb 28, 2011
1 parent 71bd828 commit 025f2c63e487e069215b2a03ded2b98198904af9
Showing with 4 additions and 3 deletions.
  1. +4 −3 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;
}
};
}

0 comments on commit 025f2c6

Please sign in to comment.