I'm trying to use the jQuery dialog as a loading screen for ajax. I have it working very well so far but I'd like the loading screen to be not closable. However it seems the UI dialog doesn't have "closable" as an option?
How do you make it non-closable? I tried setting closeText to blank but that didn't do anything. The little 'X' still shows up on the upper right corner.
Don't you think closable should be an option for the dialog widget?
Thanks
Ying, just pass a callback function to beforeclose
:
$("#loading").dialog({
beforeclose: function(){ return false }
// other options here
});
Doug, thanks for the quick reply. That disabled close action. However, it did not hide the "X" on the upper right corner. I ended up using css to hide the "X".
/* hide the close x on loading screen */
.classForMyDialog .ui-dialog-titlebar-close {
display: none;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With