开发者

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
    });
};
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜