Skip to content
Permalink
Browse files

Position: Support positioning within document with jQuery 1.6.x

Fixes #10071
Closes gh-1294
  • Loading branch information
scottgonzalez committed Jul 24, 2014
1 parent f7429ed commit 9bb51d308e0a72bc67db948e92345c826a8f724d
Showing with 5 additions and 2 deletions.
  1. +5 −2 ui/position.js
@@ -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()
};
}
};

0 comments on commit 9bb51d3

Please sign in to comment.
You can’t perform that action at this time.