- get: function( elem, force ) {
- var style = elem.style;
- if ( jQuery.support.opacity && !style.filter ) {
- return false; // move along, nothing to see here
- }
-
- // IE uses filters for opacity
- var ret = ropacity.test(elem.currentStyle.filter || "") ?
- (parseFloat(RegExp.$1) / 100) + "" :
- "";
-
- return ret === "" ?
- "1" :
- ret;
- },
-
- set: function( elem, value ) {
- var style = elem.style;
- if ( jQuery.support.opacity && !style.filter ) {
- return false; // move along, nothing to see here
- }
-
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- style.zoom = 1;
-
- // Set the alpha filter to set the opacity
- 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;
+ get: function( elem ) {
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity", "opacity" );
+ return ret === "" ? "1" : ret;