jQuery UI模式对话框打开时禁用浏览器滚动

问题描述:

有可能在打开jQuery UI模式对话框时禁用浏览器中的滚动(仅针对浏览器的滚动条).

is it possible to disable scrolling in browser (just for browser's scrollbars) while a jQuery UI modal dialog is open.

注意:我确实希望在对话框中启用滚动

Note: I do want scrolling to be enabled inside the dialog

您不能完全禁用滚动,但是可以使用鼠标滚轮和通常执行滚动的按钮停止滚动.

You can't disable scrolling completely, but you can stop scrolling with the mouse wheel and the buttons that typically perform scrolling.

看看此答案以了解其含义完毕.您可以在创建事件上调用这些函数,然后在关闭.

Take a look at this answer to understand how that is done. You could call these functions on the create event and return everything to normal, on close.