jQuery UI对话框/拖动问题 [英] jQuery UI Dialog / Drag Question
本文介绍了jQuery UI对话框/拖动问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用jQuery UI对话框
Using jQuery UI Dialog.
效果很好,但是当我拖动一个对话框时,它不会离开屏幕(整个对话框总是在视口中)
Works great, but currently, when I drag a dialog, it will not move off screen (the entire dialog is always in the viewport).
有没有办法设置对话框,所以我可以将其部分拖出屏幕?
Is there a way to set up the dialog so I can drag it partially off screen?
推荐答案
如果你扩展了jQuery对话框代码,你可以。只需包含以下代码:
Sure you can if you extend the jQuery dialog code. Just include this code:
$.ui.dialog.prototype._makeDraggable = function() {
this.uiDialog.draggable({
containment: false
});
};
它将覆盖document的默认包含值与 false
禁用遏制。
It will override the default containment value of 'document' with false
which disables the containment.
这篇关于jQuery UI对话框/拖动问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文