diff options
Diffstat (limited to 'src/css.js')
-rw-r--r-- | src/css.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/css.js b/src/css.js index 4fbc6745e..0e5a55610 100644 --- a/src/css.js +++ b/src/css.js @@ -350,6 +350,19 @@ jQuery.each( [ "height", "width" ], function( i, name ) { }; } ); +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; + } + } +); + // These hooks are used by animate to expand properties jQuery.each( { margin: "", |