var _this = this;
- function addRevealOpenClasses() {
- $('html').addClass('is-reveal-open');
- }
-
- function removeRevealOpenClasses() {
- $('html').removeClass('is-reveal-open');
- }
-
// Motion UI method of reveal
if (this.options.animationIn) {
function afterAnimation(){
'tabindex': -1
})
.focus();
- addRevealOpenClasses();
+ _this.addRevealOpenClasses();
Keyboard.trapFocus(_this.$element);
}
if (this.options.overlay) {
.focus();
Keyboard.trapFocus(this.$element);
- addRevealOpenClasses();
+ this._addRevealOpenClasses();
this._extraHandlers();
this.$element.trigger('open.zf.reveal');
}
+ _addRevealOpenClasses() {
+ $('html').addClass('is-reveal-open');
+ }
+
+ _removeRevealOpenClasses() {
+ $('html').removeClass('is-reveal-open');
+ }
+
/**
* Adds extra event handlers for the body and window if necessary.
* @private
var scrollTop = parseInt($("html").css("top"));
if ($('.reveal:visible').length === 0) {
- _this.removeRevealOpenClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal
+ _this._removeRevealOpenClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal
}
Keyboard.releaseFocus(_this.$element);
$(window).off(`.zf.reveal:${this.id}`);
if ($('.reveal:visible').length === 0) {
- _this.removeRevealOpenClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal
+ this._removeRevealOpenClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal
}
};
}