JS对话框改变关闭按钮的颜色

时间:2017-06-30 03:56:24

标签: javascript jquery

如何更改Close Button的颜色。到目前为止,我设法更改了Title BarBody的颜色,但是对于按钮,我无法更改它。

当前代码

 $("#dialogTest").dialog({
    autoOpen: false,
    height: 'auto',
    width: 'auto',
    modal: true,
    title: "<img src='../../Content/Images/icon/icons_02.png'/> RECORD HELP! MISSING DATA!",
    buttons: {
        Close: function () {
            $(this).dialog("close");
            $(this).css("background", "red");
        }
    }
}).css({ 'background-color': '#fceab0' }).prev(".ui-dialog-titlebar").css("background", "red");

enter image description here

1 个答案:

答案 0 :(得分:0)

将关闭功能更改为:

    Close: function () {
        $(this).dialog("close");
        $(this).css("background-color", "red");
    }
相关问题