有谁知道是否有办法禁用 jquery 对话框中的滚动条?我在 div 中的内容是 300 px,但对话框设置为 200 px。它会自动放置滚动条,但我不想要它们。我将自己将其添加到第二个 div 中,使其比窗口更大。如有任何帮助,我们将不胜感激。
最佳答案
我是这样解决这个问题的:
.dialog({
title: $(this).attr("data-dialog-title"),
closeOnEscape: true,
close: function () { $(this).remove() },
draggable: true,
position: 'center',
width: 500,
height: 'auto',
modal: true,
open: function (event, ui) {
$('#myDialogId').css('overflow', 'hidden'); //this line does the actual hiding
}
});
关于jquery - 如何禁用 jQuery UI 对话框中的滚动条?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1619750/