如何让jquery-ui-dialog没有关闭按钮?
I didn't find this in the documentation.
Should I just make the close button display:none
with css, or is there a clean way in the API to make a dialog without the X button (top-right)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这可能会解决您的问题:
This may solve your Problem:
没有选项可以禁用“X”按钮。您需要添加 css 以在加载和打开时显示 none/hide() 类为“ui-icon-closethick”的元素。
There is no option to disable the 'X' button. You would need to add css to display none/hide() the element with the class 'ui-icon-closethick' when it is loaded and opened.
由于某种原因 .hide() 对我不起作用。这样做了:
此代码片段还显示了如何设置对话框的标题和文本——我将其用作模式通知窗口,并在 AJAX 调用完成时关闭它。
For some reason .hide() did not work for me. This did:
This code snippet also shows how to set the title and text of the dialog box -- I am using it as a modal notification window and closing it when my AJAX call completes.