mirror of
https://github.com/jquery/jquery.git
synced 2026-02-03 09:54:58 -05:00
Fix css("opacity") to not clobber other filters in IE. Closes #4707.
This commit is contained in:
@@ -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 ?
|
||||
|
||||
Reference in New Issue
Block a user