Skip to content

Commit

Permalink
Position: Support positioning within document with jQuery 1.6.x
Browse files Browse the repository at this point in the history
Fixes #10071
Closes gh-1294
  • Loading branch information
scottgonzalez committed Jul 24, 2014
1 parent f7429ed commit 9bb51d3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ui/position.js
Expand Up @@ -123,8 +123,11 @@ $.position = {
offset: withinElement.offset() || { left: 0, top: 0 },
scrollLeft: withinElement.scrollLeft(),
scrollTop: withinElement.scrollTop(),
width: isWindow ? withinElement.width() : withinElement.outerWidth(),
height: isWindow ? withinElement.height() : withinElement.outerHeight()

// support: jQuery 1.6.x
// jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows
width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(),
height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight()
};
}
};
Expand Down

0 comments on commit 9bb51d3

Please sign in to comment.