diff options
author | louisremi <louisremi@louisremi-laptop.(none)> | 2011-04-11 20:33:52 +0200 |
---|---|---|
committer | louisremi <louisremi@louisremi-laptop.(none)> | 2011-04-11 20:33:52 +0200 |
commit | 272b8d69dcff771ffdb61ccd33c4e83eaea8ca50 (patch) | |
tree | edc8bfd3f49fc862ef69d78a5da9897650f39eed /src | |
parent | 56ffad2dad138293c132e6ad353111bd2d1f1239 (diff) | |
download | jquery-272b8d69dcff771ffdb61ccd33c4e83eaea8ca50.tar.gz jquery-272b8d69dcff771ffdb61ccd33c4e83eaea8ca50.zip |
replace cssPropsAware branch
Diffstat (limited to 'src')
-rw-r--r-- | src/css.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/css.js b/src/css.js index 65ec20f57..d53a1f63c 100644 --- a/src/css.js +++ b/src/css.js @@ -123,10 +123,16 @@ jQuery.extend({ css: function( elem, name, extra ) { // Make sure that we're working with the right name - var ret, origName = jQuery.camelCase( name ), - hooks = jQuery.cssHooks[ origName ]; - - name = jQuery.cssProps[ origName ] || origName; + var ret, + hooks; + + name = jQuery.camelCase( name ); + hooks = jQuery.cssHooks[ name ]; + name = jQuery.cssProps[ name ] || name; + // 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 ); } }, @@ -273,7 +279,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(); |