Disable close button in Jquery UI Dialog

Manas Babu picture Manas Babu · Sep 28, 2010 · Viewed 18.5k times · Source

Possible Duplicate:
Remove close button on jQueryUI Dialog?

I am getting some problem to disable close button in JQuery UI Dialog.

My code is like bellow.

$(document).ready(function () {
     $("#dialog").dialog({ 
            modal: true,
            width:800
     });
});

Thanx in Advance

Answer

Umakanta.Swain picture Umakanta.Swain · Sep 28, 2010

Try this It ll work..

$(document).ready(function () {
    $("#dialog").dialog({  
        open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); },
        modal: true,
        width:800
    });
});