7*4 2009-05-22 07:55 采纳率: 50%
浏览 502
已采纳

如何删除 jQuery UI 对话框中的关闭按钮?

How do I remove the close button (the X in the top-right corner) on a dialog box created by jQuery UI?

转载于:https://stackoverflow.com/questions/896777/how-to-remove-close-button-on-the-jquery-ui-dialog

  • 写回答

22条回答 默认 最新

  • from.. 2009-05-22 11:20
    关注

    I have found this worked in the end (note the third line overriding the open function which find the button and hides it):

    $("#div2").dialog({
        closeOnEscape: false,
        open: function(event, ui) {
            $(".ui-dialog-titlebar-close", ui.dialog | ui).hide();
        }
    });
    

    To hide the close button on all dialogs you can use the following CSS too:

    .ui-dialog-titlebar-close {
        visibility: hidden;
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(21条)

报告相同问题?

悬赏问题

  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型