Merge branch 'master' of https://github.com/inukshuk/jquery into inukshuk-master
Conflicts: test/unit/offset.js
This commit is contained in:
commit
0d755dff13
2 changed files with 32 additions and 4 deletions
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue