diff --git a/src/jquery.fenster.js b/src/jquery.fenster.js index bb44af8..957ce21 100644 --- a/src/jquery.fenster.js +++ b/src/jquery.fenster.js @@ -30,12 +30,12 @@ // default options var defaultOptions = { - 'href': null, - 'selector': null, - 'options': null, - 'delayOpen': 200, - 'callbackOpen': $.noop, - 'callbackClose': $.noop + href: null, + selector: null, + options: null, + delayOpen: 200, + callbackOpen: $.noop, + callbackClose: $.noop }; // the main object @@ -108,6 +108,7 @@ setTimeout(function () { this.setHolder(this.element.data('jqFensterHolder')); + this.getHolder().on('jqFensterCallbackClose', this.close.bind(this)); cbToExecute.call(this); }.bind(this), this.options.delayOpen);