Dragging jQuery dialog past viewport
I'm using jQuery dialog and hav开发者_运维百科e problems dragging the dialog partially outside of the viewport.
The demo for the Draggable does exactly what I want: http://jqueryui.com/demos/draggable/default.html
But the demo for the Dialog doesn't allow the dialog to be moved partially outside of the viewport: http://jqueryui.com/demos/dialog/default.html
How to make the Dialog to allow dragging partially off the viewport?
You can extend the jQuery UI dialog box by changing the containment. The default value is 'document'.
$.ui.dialog.prototype._makeDraggable = function () {
this.uiDialog.draggable({
containment: false
});
};
精彩评论