禁用浏览器滚动,而jQuery UI模态对话框打开(disable browser scrolling while jQuery UI modal dialog is open)
是否可以在浏览器中禁用滚动(仅适用于浏览器的滚动条),而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.
更多推荐
发布评论