按下转义键时如何破坏jquery对话框?
有没有办法添加这样的代码: $.dialog('destroy');
在关闭事件中?这是关闭事件:它看到最后一个“else”有一个隐藏方法,这就是那个家伙。但不能在那里摧毁任何东西:
close: function( event ) {
var that = this,
maxZ, thisZ;
if ( !this._isOpen ) {
return;
}
if ( false === this._trigger( "beforeClose", event ) ) {
return;
}
this._isOpen = false;
if ( this.overlay ) {
this.overlay.destroy();
}
if ( this.options.hide ) {
this._hide( this.uiDialog, this.options.hide, function() {
that._trigger( "close", event );
});
} else {
this.uiDialog.hide();
this._trigger( "close", event );
}