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

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

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

23条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 15:41

    You can use jquery to hide titlebar after using dialogClass when initializing the dialog.

    during init :

    $('.selector').dialog({
        dialogClass: 'yourclassname'
    });
    
    $('.yourclassname div.ui-dialog-titlebar').hide();
    

    By using this method, you don't need to change your css file, and this is dynamic too.

提交回复
热议问题