Alex Rivera | Logout

Disable 'X' button in top-right of Dialog

Asked 2010-01-11T15:20:06.167
43

Possible Duplicate:
Remove close button on jQueryUI Dialog?

I'm trying to make a dialog that requires a user to agree to terms before continuing, and don't want to allow the user to just click the 'X' in the top right corner of the dialog to close. I'd like to require that the user click 'I agree'.

Is there any way to disable the 'X' in the dialog?

Clarification: I'm just using the standard jQuery UI dialog: $.dialog().

Edit
Report

1 Answer

62

I found this on another post, hopes it helps, it worked for me:

$("#div2").dialog({
   closeOnEscape: false,
   open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }
});

This is the link:

How to remove close button on the jQuery UI dialog?

answered 2011-10-27T18:54:56.933

Your Answer