Skip to content

Commit

Permalink
Collapse drop down menu on click outside menu
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaglic committed Nov 21, 2024
1 parent 32f32bf commit 7258357
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@


<!-- TODO: Seems unnecessary to have this div here -->
<div class="wrapper">
<div class="wrapper" onclick="collapseNav()">
<section>
<div id="wordmark-container">
<img class="title" src="/docs/assets/images/wordmark.png" alt="MoloVol" height="72">
Expand Down
6 changes: 6 additions & 0 deletions assets/js/dropNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ function dropNav() {
dropped = !dropped;
}

function collapseNav() {
// TODO: Can we avoid using a global variable?
dropped = true;
dropNav();
}

0 comments on commit 7258357

Please sign in to comment.