site/static/assets/main.js
2020-08-11 16:54:14 +02:00

10 lines
330 B
JavaScript

document.addEventListener('DOMContentLoaded', () => {
Array.from(document.querySelectorAll('.navbar-burger')).forEach(el => {
el.addEventListener('click', () => {
const target = document.getElementById(el.dataset.target)
el.classList.toggle('is-active')
target.classList.toggle('is-active')
})
})
})