Close title showing in jquery dialog?

1.2k Views Asked by At

My jquery dialog box showing close as title at cross icon place. I did not add anywhere but it is showing on dialog load. How to get rid of it?

<div id="ConfirmdialogRoster" title="Confirmation!" style="display:none;" class="section_detail-font-14">
        Please confirm that you have completed your changes and want to submit your roster.
</div>

 $("#ConfirmdialogRoster").dialog({
        height: 200,
        width: 500,
        buttons: {
            "Save": {
                text: "Confirm",
                class: "btn btn-success",
                click: function() {
                    $(this).dialog("close");
                    $("#ActionProgress").show();
                    $('#btnSubmitValidation').removeClass('validationErrorShow').addClass('validationErrorHide');
                    //AJAX Call here                        
                    }
                },
            "Cancel": {
                text: "Cancel",
                class: "linkbutton",
                click: function () {
                    $(this).dialog("close");
                    $("#ActionProgress").hide();
                }
            }

        }
    }).prev(".ui-dialog-titlebar").css("background", "#21416b");

enter image description here

html View

 <button type="button" class="ui-button ui-corner-all ui-widget ui-button-icon-only 
ui-dialog-titlebar-close" title="Close"><span class="ui-button-icon ui-icon 
ui-icon-closethick"></span><span class="ui-button-icon-space"> </span>Close</button>
2

There are 2 best solutions below

0
On

You can achieve this by adding following CSS

button.ui-dialog-titlebar-close {
  display: none;
}
0
On
button.ui-button.ui-dialog-titlebar-close {  display: none; }