jquery UI dialog: how to initialize without a title bar?

前端 未结 23 1785
春和景丽
春和景丽 2020-11-29 15:03

Is it possible to open a jQuery UI Dialog without a title bar?

23条回答
  •  心在旅途
    2020-11-29 15:51

    I believe you can hide it with CSS:

    .ui-dialog-titlebar {
        display: none;
    }
    

    Alternatively, you can apply this to specific dialogs with the dialogClass option:

    $( "#createUserDialog" ).dialog({
        dialogClass: "no-titlebar"
    });
    
    .no-titlebar .ui-dialog-titlebar {
        display: none;
    }
    

    Check out "Theming" the Dialog. The above suggestion makes use of the dialogClass option, which appears to be on it's way out in favor of a new method.

提交回复
热议问题