Действительно ли возможно добавить включение (ограничение границей другого элемента) к Диалоговому окну UI jQuery?
Вы можете нацелить диалоговое окно и применить к нему сдерживание. Попробуйте следующее:
var container = $('.dialog-container'),
dialog = $('.ui-dialog');
// get container top left corner locations
var cx1 = container.offset().left,
cy1 = container.offset().top;
// get dialog size
var dw = dialog.outerWidth(),
dh = dialog.outerHeight();
// get container bottom right location, then subtract the dialog size
var cx2 = container.width() + cx1 - dw,
cy2 = container.height() + cy1 - dh;
dialog.draggable( "option", "containment", [cx1, cy1, cx2, cy2] );
Изменить: Я установил для вас демо .
Edit2: изменено использование диалоговых окон outerWidth и outerHeight