jQuery has an opacity correction when you use the css method (lines 4592-4608 on jQuery 1.4.2):
if ( !jQuery.support.opacity && name === "opacity" ) {
if ( set ) {
style.zoom = 1;
var opacity = parseInt( value, 10 ) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")";
var 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 ?
(parseFloat( ropacity.exec(style.filter)[1] ) / 100) + "":
"";
}
I began to extend this behavior to turn css 3 selectors into compatibility with several browsers (using the set of recipes which the Compass infrastructure implemented ).
Is there a project that is already doing this?
source
share