site/static/assets/main.js

10 lines
330 B
JavaScript
Raw Permalink Normal View History

2020-08-11 16:14:38 +02:00
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')
})
})
})