Close nav on page open. This is to work with the back button behavior on mobile.

This commit is contained in:
jeff 2022-07-11 16:07:55 -07:00
parent 0c70a13a3a
commit 456d9f9e21

View File

@ -19,5 +19,16 @@
{{ partialCached "footer.html" . }} {{ partialCached "footer.html" . }}
{{ partialCached "js-global.html" . }} {{ partialCached "js-global.html" . }}
<script>
(function() {
var drawerLinks = navDrawer.getElementsByTagName("a");
for (var i=0; i<drawerLinks.length; i++) {
drawerLinks[i].addEventListener("click", function() {
navToggle.checked = false;
});
}
})()
</script>
</body> </body>
</html> </html>