Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
Added JS to handle the mobile navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
hepplerj committed Aug 26, 2024
1 parent 3ed397c commit 4b3c336
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@
</footer>
</div>

<script src="/js/main.js"></script>

</body>
</html>
8 changes: 8 additions & 0 deletions static/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
document.addEventListener('DOMContentLoaded', function () {
const navbarToggler = document.querySelector('.navbar-toggler');
const navbarCollapse = document.querySelector('#navbarNavDropdown');

navbarToggler.addEventListener('click', function () {
navbarCollapse.classList.toggle('show');
});
});

0 comments on commit 4b3c336

Please sign in to comment.