-
Notifications
You must be signed in to change notification settings - Fork 76
Position Option
Ryan Segura edited this page Feb 4, 2016
·
2 revisions
Type: Object
Since: 2.3
Default:
{ my: 'left top+1', at: 'left bottom', collision: 'flip', of: $('.selector') }
If the jQuery UI .position() plugin is loaded the menu will be moved to an alternative position when it overflows the window in some direction.
For more information see the collision option.
In addition you can specify where you would like the menu to positiond using the jQuery IU .position() plugin options.
The properties you specify in the position hash will be merged with the default properties (shown above).
See example below:
Set the option upon init.
// The collision property will be morged with the defualt properties so the position plugin will receive: // { my: 'left top+1', at: 'left bottom', collision: 'fit flip', of: $('.selector') } $('.selector').MonthPicker({ Position: { collision: 'fit flip' } });
Get or set the option, after init.
//getter var position = $('.selector').MonthPicker('option', 'Position'); //setter $('.selector').MonthPicker('option', 'Position', {collision: 'fit', at: 'left bottom'});