diff options
author | louisremi <louisremi@louisremi-laptop.(none)> | 2011-04-12 11:29:25 +0200 |
---|---|---|
committer | louisremi <louisremi@louisremi-laptop.(none)> | 2011-04-12 11:29:25 +0200 |
commit | a5604aedb74ec39624b21229a5c8542c793b0382 (patch) | |
tree | 9fa541ff92d96a8979af260a31f2d75492e696fd /src/offset.js | |
parent | 8547b34f9265ed2d2b5380b1db5dfcaf97d96d5a (diff) | |
parent | 312df0441b16981dd697d74fcbc1e1f212b47b7e (diff) | |
download | jquery-a5604aedb74ec39624b21229a5c8542c793b0382.tar.gz jquery-a5604aedb74ec39624b21229a5c8542c793b0382.zip |
merge with master and resolve more conflicts
Diffstat (limited to 'src/offset.js')
-rw-r--r-- | src/offset.js | 8 |
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 ); } |