aboutsummaryrefslogtreecommitdiffstats
path: root/src/offset.js
diff options
context:
space:
mode:
authorlouisremi <louisremi@louisremi-laptop.(none)>2011-04-12 11:29:25 +0200
committerlouisremi <louisremi@louisremi-laptop.(none)>2011-04-12 11:29:25 +0200
commita5604aedb74ec39624b21229a5c8542c793b0382 (patch)
tree9fa541ff92d96a8979af260a31f2d75492e696fd /src/offset.js
parent8547b34f9265ed2d2b5380b1db5dfcaf97d96d5a (diff)
parent312df0441b16981dd697d74fcbc1e1f212b47b7e (diff)
downloadjquery-a5604aedb74ec39624b21229a5c8542c793b0382.tar.gz
jquery-a5604aedb74ec39624b21229a5c8542c793b0382.zip
merge with master and resolve more conflicts
Diffstat (limited to 'src/offset.js')
-rw-r--r--src/offset.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/offset.js b/src/offset.js
index b9a132b42..95177434c 100644
--- a/src/offset.js
+++ b/src/offset.js
@@ -186,11 +186,13 @@ jQuery.offset = {
// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
if ( calculatePosition ) {
curPosition = curElem.position();
+ curTop = curPosition.top;
+ curLeft = curPosition.left;
+ } else {
+ curTop = parseFloat( curCSSTop ) || 0;
+ curLeft = parseFloat( curCSSLeft ) || 0;
}
- curTop = calculatePosition ? curPosition.top : parseInt( curCSSTop, 10 ) || 0;
- curLeft = calculatePosition ? curPosition.left : parseInt( curCSSLeft, 10 ) || 0;
-
if ( jQuery.isFunction( options ) ) {
options = options.call( elem, i, curOffset );
}