Skip to content
Permalink
Browse files

position: make it work without ui.core.js

  • Loading branch information
chicheng committed Jul 25, 2009
1 parent f450302 commit ee3a1718fb818f48b7de25266d9637c674f6e879
Showing with 6 additions and 3 deletions.
  1. +6 −3 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();

0 comments on commit ee3a171

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