Hi
When a dialog box pops up there is a "X" in the top right hand corner. I am wondering if there is an option to disable this?
Thanks
Hi
When a dialog box pops up there is a "X" in the top right hand corner. I am wondering if there is an option to disable this?
Thanks
The "X" is placed in an anchor tag with the default class="ui-dialog-titlebar-close ui-corner-all ui-state-focus"
.
You can set the display
to none
.
a.ui-dialog-titlebar-close{
display: none;
}
Changing the CSS will affect other dialogs.
I'm using the following in the dialog definition, which is executed when it's opened:
open: function() {
$(this).parent().children(':first').children('a').remove();
},
Alternatively you can pass a 'showclose' logical to the function and let the open method logic decide for you.
open: function(event, ui) {
if (!showclose)
$j(ui).find(".ui-dialog-titlebar-close").hide();
else
$j(ui).find(".ui-dialog-titlebar-close").show();
}
That way you can choose to show it each time you call $.dialog.