aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorChi Cheng <cloudream@gmail.com>2009-07-25 19:56:11 +0000
committerChi Cheng <cloudream@gmail.com>2009-07-25 19:56:11 +0000
commitee3a1718fb818f48b7de25266d9637c674f6e879 (patch)
tree9254a36c2dfe4fb1d5ddffe3723cf1d77c482b15 /ui
parentf450302692ca417e85c25ff08931261f4acc8bad (diff)
downloadjquery-ui-ee3a1718fb818f48b7de25266d9637c674f6e879.tar.gz
jquery-ui-ee3a1718fb818f48b7de25266d9637c674f6e879.zip
position: make it work without ui.core.js
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.position.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/ui/ui.position.js b/ui/ui.position.js
index b77e96e60..330443c47 100644
--- a/ui/ui.position.js
+++ b/ui/ui.position.js
@@ -9,6 +9,8 @@
*/
(function($) {
+$.ui = $.ui || {};
+
var horizontalPositions = /left|center|right/,
horizontalDefault = 'center',
verticalPositions = /top|center|bottom/,
@@ -20,9 +22,7 @@ $.fn.position = function(options) {
return _position.apply(this, arguments);
}
- options = $.extend({
- stackFix: true
- }, options);
+ options = $.extend({}, $.ui.position.defaults, options);
var target = $(options.of),
collision = (options.collision || 'flip').split(' '),
@@ -146,6 +146,9 @@ $.fn.position = function(options) {
};
$.ui.position = {
+ defaults:{
+ stackFix: true
+ },
fit: {
left: function(position, data) {
var over = position.left + data.elemWidth - $(window).width() - $(window).scrollLeft();