Skip to content

Instantly share code, notes, and snippets.

@jzaefferer
Created April 17, 2012 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jzaefferer/c5faba40bb09b2b30f3a to your computer and use it in GitHub Desktop.
Save jzaefferer/c5faba40bb09b2b30f3a to your computer and use it in GitHub Desktop.
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js
index 7d30e4b..4c73c10 100644
--- a/ui/jquery.ui.position.js
+++ b/ui/jquery.ui.position.js
@@ -86,17 +86,13 @@ $.fn.position = function( options ) {
// make a copy, we don't want to modify arguments
options = $.extend( {}, options );
- var target = $( options.of ),
+ var atOffset, targetWidth, targetHeight, targetOffset, basePosition,
+ target = $( options.of ),
within = $.position.getWithinInfo( options.within ),
scrollInfo = $.position.getScrollInfo( within ),
targetElem = target[0],
collision = ( options.collision || "flip" ).split( " " ),
- offsets = {},
- atOffset,
- targetWidth,
- targetHeight,
- targetOffset,
- basePosition;
+ offsets = {};
if ( targetElem.nodeType === 9 ) {
targetWidth = target.width();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment