cdm-utils/js/index.js
2021-10-29 13:06:35 +03:00

15 lines
447 B
JavaScript

const burgerIcon = document.querySelector('#burger');
const navbarMenu = document.querySelector('#nav-links');
burgerIcon.addEventListener('click', () => {
burgerIcon.classList.toggle('is-active');
navbarMenu.classList.toggle('is-active');
});
const dropDowns = document.querySelectorAll('#dropdown');
dropDowns.forEach(element => {
element.addEventListener('click', () => {
element.classList.toggle('is-active');
})
});