I donโt know if you are interested in this, but I was looking for it and could not find it, so I had to create my own solution. You should update the plugin though (jquery.blockUI.js) and go to this line:
if ( opts.title ) { s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>';
and replace it with this:
if ( opts.title ) { s += '<div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix"><span id="ui-id-1" class="ui-dialog-title">' +(opts.title || ' ')+ '</span><button id="btnCloseBlockUI" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only ui-dialog-titlebar-close" role="button" aria-disabled="false" title="close"><span class="ui-button-icon-primary ui-icon ui-icon-closethick"></span><span class="ui-button-text">close</span></button></div>';
This will add a button to the title bar. To add a button click handler:
You can be more fantastic and add an additional parameter, for example, showCloseButtonUI and display it only when it is set to true.
source share