禁用浏览器滚动,而jQuery UI模态对话框打开(disable browser scrolling while jQuery UI modal dialog is open)

编程入门 行业动态 更新时间:2024-10-23 04:57:43
禁用浏览器滚动,而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.

更多推荐

本文发布于:2023-08-06 04:39:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1444446.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:对话框   浏览器   模态   UI   jQuery

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!