aboutsummaryrefslogtreecommitdiffstats
path: root/src/offset.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2011-01-18 14:20:05 -0500
committerJohn Resig <jeresig@gmail.com>2011-01-18 14:20:05 -0500
commitc1d719b580ea78c33961113030d7fa25bcc98e6f (patch)
tree0b79010bb7c1def156666b638478b62a38b0070a /src/offset.js
parent3d0aa196c5420e7f68b32cee38f0cc740d4959c6 (diff)
parent50170e618059d10132a5319c64660a631b095f44 (diff)
downloadjquery-c1d719b580ea78c33961113030d7fa25bcc98e6f.tar.gz
jquery-c1d719b580ea78c33961113030d7fa25bcc98e6f.zip
Merge branch 'master' of https://github.com/russtacular/jquery into russtacular-master
Diffstat (limited to 'src/offset.js')
-rw-r--r--src/offset.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/offset.js b/src/offset.js
index 2040c9d83..a10d30a0f 100644
--- a/src/offset.js
+++ b/src/offset.js
@@ -30,7 +30,7 @@ if ( "getBoundingClientRect" in document.documentElement ) {
// Make sure we're not dealing with a disconnected DOM node
if ( !box || !jQuery.contains( docElem, elem ) ) {
- return box || { top: 0, left: 0 };
+ return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
}
var body = doc.body,