diff --git a/src/offset.js b/src/offset.js index 907dc0989..18e6eebed 100644 --- a/src/offset.js +++ b/src/offset.js @@ -144,8 +144,10 @@ jQuery.fn.extend( { } // Add offsetParent borders - parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); - parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); + parentOffset = { + top: parentOffset.top + jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ), + left: parentOffset.left + jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ) + }; } // Subtract parent offsets and element margins