njpma/app/static/js/menu.js

9 lines
293 B
JavaScript
Raw Normal View History

2021-10-11 12:26:51 +00:00
document.querySelectorAll(".topnav a.icon").forEach(a => {
a.onclick = (event) => {
var nav = document.querySelector('.topnav nav')
nav.style.display = nav.style.display === 'block' ? 'none' : 'block'
event.preventDefault()
event.stopPropagation()
}
})