Skip to content

Commit

Permalink
Hiding navbar when opening search via click
Browse files Browse the repository at this point in the history
Signed-off-by: George Araujo <george.gcac@gmail.com>
  • Loading branch information
george-gca committed May 23, 2024
1 parent fc0d26b commit 0f9273b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions _includes/scripts/search.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
}
const openSearchModal = () => {
// collapse navbarNav if expanded on mobile
const navbarNav = document.querySelector('.navbar-collapse');
if (navbarNav.classList.contains('show')) {
navbarNav.classList.remove('show');
}
ninjaKeys.open();
};
</script>
Expand Down

0 comments on commit 0f9273b

Please sign in to comment.