Fix css("opacity") to not clobber other filters in IE. Closes #4707.

This commit is contained in:
Yehuda Katz 2009-12-01 11:40:28 -08:00
parent 839e97199c
commit 64e4a879f9
2 changed files with 20 additions and 8 deletions

View file

@ -52,8 +52,9 @@ jQuery.extend({
style.zoom = 1;
// Set the alpha filter to set the opacity
style.filter = (style.filter || "").replace( ralpha, "" ) +
(parseInt( value, 10 ) + '' === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
var opacity = parseInt( value, 10 ) + '' === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")";
filter = style.filter || jQuery.curCSS( elem, 'filter' ) || ""
style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity;
}
return style.filter && style.filter.indexOf("opacity=") >= 0 ?