$('html').addClass('is-reveal-open');
}
+ function removeRevealOpenClasses() {
+
+ $('html').removeClass('is-reveal-open');
+ }
+
// Motion UI method of reveal
if (this.options.animationIn) {
function afterAnimation(){
var scrollTop = parseInt($("html").css("top"));
if ($('.reveal:visible').length === 0) {
- $('html').removeClass('is-reveal-open');
+ removeRevealOpenClasses();
}
Keyboard.releaseFocus(_this.$element);
this.$element.hide().off();
this.$anchor.off('.zf');
$(window).off(`.zf.reveal:${this.id}`);
+
+ if ($('.reveal:visible').length === 0) {
+ removeRevealOpenClasses();
+ }
};
}