Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save michaelbrazell/729a0139b468b44b7ebdd682ab709fde to your computer and use it in GitHub Desktop.
Save michaelbrazell/729a0139b468b44b7ebdd682ab709fde to your computer and use it in GitHub Desktop.
Foundation 6.3.1 has an issue when modifying Reveal where it doesn't remove the is-reveal-open class from the body after closing a reveal. You can hook into the close event to fire this. This was fixed in 6.4 but if you can't update and don't want to modify the core Foundation files, you can add this to your page. Requires jQuery obviously.
// Fix issue with foundation not closing "is reveal open"
$(document).on('closed.zf.reveal', function() {
if ($('body').hasClass('is-reveal-open')) {
$('body').removeClass('is-reveal-open');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment