50projects50days/rotating-nav-animation/script.js

7 lines
300 B
JavaScript
Raw Normal View History

2020-10-26 18:15:19 +00:00
const open = document.getElementById('open')
const close = document.getElementById('close')
const container = document.querySelector('.container')
open.addEventListener('click', () => container.classList.add('show-nav'))
close.addEventListener('click', () => container.classList.remove('show-nav'))