Apply CSS to jQuery Dialog Buttons

前端 未结 10 2188
攒了一身酷
攒了一身酷 2020-12-01 01:02

So I currently have a jQuery dialog with two buttons: Save and Close. I create the dialog using the code below:

$dialogDiv.dialog({
    autoOpen: false,
             


        
10条回答
  •  北荒
    北荒 (楼主)
    2020-12-01 01:40

    There is also a simple answer for defining specific styles that are only going to be applied to that specific button and you can have Jquery declare element style when declaring the dialog:

    id: "button-delete",
    text: "Delete",
    style: "display: none;",
    click: function () {}
    

    after doing that here is what the html shows:

    doing this allows you to set it, but it is not necessarily easy to change using jquery later.

提交回复
热议问题