self.contentDiv = $('.panel-content', panelWrap);
self.instanceId = Math.ceil(Math.random() * 1000000000);
$.log('new panel - wrap: ', self.wrap);
-
$(document).bind('panel:unload.' + self.instanceId,
function(event, data) { self.unload(event, data); });
return false;
});
-
}
Panel.prototype.callHook = function(hookName) {
if( data == this ) {
$.log('unloading', this);
- $(document).unbind('panel:unload.' + this.instanceId);
$(this.contentDiv).html('');
this.callHook('unload');
this.hooks = null; // flush the hooks