diff options
author | timmywil <tim.willison@thisismedium.com> | 2011-03-31 02:55:16 -0400 |
---|---|---|
committer | timmywil <tim.willison@thisismedium.com> | 2011-03-31 02:55:16 -0400 |
commit | f9cc5597a47e8a95b13fa5599e94c20fe80903e0 (patch) | |
tree | 26d7ef220e4fc22e7236a27626935664b4294485 /src/offset.js | |
parent | 6c28a394c2174c51196cd9ac073b819fc79adb3b (diff) | |
download | jquery-f9cc5597a47e8a95b13fa5599e94c20fe80903e0.tar.gz jquery-f9cc5597a47e8a95b13fa5599e94c20fe80903e0.zip |
Fix test cases for bug #8316 fix.
- Removed special page, just needed another test in the fixed offset tests
- Checks it's position related to scrolling
Diffstat (limited to 'src/offset.js')
-rw-r--r-- | src/offset.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/offset.js b/src/offset.js index 972278c8d..a0cd7a156 100644 --- a/src/offset.js +++ b/src/offset.js @@ -37,8 +37,8 @@ if ( "getBoundingClientRect" in document.documentElement ) { win = getWindow(doc), clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, - scrollTop = (win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop ), - scrollLeft = (win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft), + scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop, + scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft, top = box.top + scrollTop - clientTop, left = box.left + scrollLeft - clientLeft; @@ -180,7 +180,7 @@ jQuery.offset = { curOffset = curElem.offset(), curCSSTop = jQuery.css( elem, "top" ), curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = ((position === "absolute" || position === "fixed") && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1), + calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1, props = {}, curPosition = {}, curTop, curLeft; // need to be able to calculate position if either top or left is auto and position is either absolute or fixed |