return _position.apply(this, arguments);\r
}\r
\r
- options = $.extend({}, $.ui.position.defaults, options);\r
-\r
var target = $(options.of),\r
collision = (options.collision || 'flip').split(' '),\r
offset = options.offset ? options.offset.split(' ') : [0, 0],\r
// force my and at to have valid horizontal and veritcal positions\r
// if a value is missing or invalid, it will be converted to center \r
$.each(['my', 'at'], function() {\r
- var pos = ( options[this] || "" ).split(' ');\r
+ var pos = (options[this] || '').split(' ');\r
pos = pos.length == 1\r
? horizontalPositions.test(pos[0])\r
? pos.concat([verticalDefault])\r
}));\r
});\r
\r
- (options.stackfix && $.fn.stackfix && elem.stackfix());\r
+ (options.stackfix !== false && $.fn.stackfix && elem.stackfix());\r
// the by function is passed the offset values, not the position values\r
// we'll need the logic from the .offset() setter to be accessible for\r
// us to calculate the position values to make the by option more useful\r
};\r
\r
$.ui.position = {\r
- defaults:{\r
- stackFix: true\r
- },\r
fit: {\r
left: function(position, data) {\r
var over = position.left + data.elemWidth - $(window).width() - $(window).scrollLeft();\r