Home > DeveloperSection > Forums > How to remove close button on the jQuery UI dialog?
Brad Pitt
Brad Pitt

Total Post:61

Posted on    April-01-2015 7:31 AM

 JavaScript JQuery  Jquery UI 

 1 Reply(s)
 990  View(s)
Rate this:

How do I remove the close button (the X in the top-right corner) on a dialog box created by jQuery UI?

Alex Leblois
Alex Leblois

Total Post:67

Posted on    April-01-2015 7:50 AM

I have found this worked in the end (note the third line overriding the open function which find the button and hides it):



   closeOnEscape: false,

   open: function(event, ui) { $(".ui-dialog-titlebar-close", ui.dialog || ui).hide(); }


To hide the close button on all dialogs you can use the following CSS too:


.ui-dialog-titlebar-close {

  visibility: hidden;


Don't want to miss updates? Please click the below button!

Follow MindStick