aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/css.js')
-rw-r--r--src/css.js25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/css.js b/src/css.js
index dfa820e22..964b18fcd 100644
--- a/src/css.js
+++ b/src/css.js
@@ -122,11 +122,17 @@ jQuery.extend({
},
css: function( elem, name, extra ) {
+ var ret, hooks;
+
// Make sure that we're working with the right name
- var ret, origName = jQuery.camelCase( name ),
- hooks = jQuery.cssHooks[ origName ];
+ name = jQuery.camelCase( name );
+ hooks = jQuery.cssHooks[ name ];
+ name = jQuery.cssProps[ name ] || name;
- name = jQuery.cssProps[ origName ] || origName;
+ // cssFloat needs a special treatment
+ if ( name === "cssFloat" ) {
+ name = "float";
+ }
// If a hook was provided get the computed value from there
if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
@@ -134,7 +140,7 @@ jQuery.extend({
// Otherwise, if a way to get the computed value exists, use that
} else if ( curCSS ) {
- return curCSS( elem, name, origName );
+ return curCSS( elem, name );
}
},
@@ -231,7 +237,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
@@ -241,11 +248,15 @@ 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) :
+<<<<<<< HEAD
style.filter + " " + opacity;
+=======
+ filter + " " + opacity;
+>>>>>>> 312df0441b16981dd697d74fcbc1e1f212b47b7e
}
};
}
@@ -273,7 +284,7 @@ jQuery(function() {
});
if ( document.defaultView && document.defaultView.getComputedStyle ) {
- getComputedStyle = function( elem, newName, name ) {
+ getComputedStyle = function( elem, name ) {
var ret, defaultView, computedStyle;
name = name.replace( rupper, "-$1" ).toLowerCase();