50projects50days/animated-navigation/script.js

5 lines
164 B
JavaScript
Raw Permalink Normal View History

2020-09-06 19:13:20 +00:00
const toggle = document.getElementById('toggle')
const nav = document.getElementById('nav')
toggle.addEventListener('click', () => nav.classList.toggle('active'))