var _this = this;
function addRevealOpenClasses() {
-
$('html').addClass('is-reveal-open');
}
function removeRevealOpenClasses() {
-
$('html').removeClass('is-reveal-open');
}
var scrollTop = parseInt($("html").css("top"));
if ($('.reveal:visible').length === 0) {
- removeRevealOpenClasses();
+ 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) {
- removeRevealOpenClasses();
+ this.removeRevealOpenClasses(); // also remove .is-reveal-open from the html element when there is no opened reveal
}
};
}