diff options
author | jeresig <jeresig@gmail.com> | 2011-04-12 00:37:51 -0400 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2011-04-12 00:37:51 -0400 |
commit | db80ad94d5f8d008b44b4b4b13157b5aeea14c4f (patch) | |
tree | 4a286ef316e51e41b0ff5e2ae92e3d5cfdbf8a77 /src/css.js | |
parent | 430d9e0b066512f00ceb7573249b45747d7792ff (diff) | |
parent | 272b8d69dcff771ffdb61ccd33c4e83eaea8ca50 (diff) | |
download | jquery-db80ad94d5f8d008b44b4b4b13157b5aeea14c4f.tar.gz jquery-db80ad94d5f8d008b44b4b4b13157b5aeea14c4f.zip |
Merge branch 'fix_8402' of https://github.com/lrbabe/jquery into lrbabe-fix_8402
Diffstat (limited to 'src/css.js')
-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 f764f321f..40e59a85e 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 ); } }, @@ -274,7 +280,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(); |