cycat-project-website/assets/js/scripts.js

10 lines
346 B
JavaScript

var body = document.querySelector('body')
var menuTrigger = document.querySelector('#toggle-main-menu-mobile');
var menuContainer = document.querySelector('#main-menu-mobile');
menuTrigger.onclick = function() {
menuContainer.classList.toggle('open');
menuTrigger.classList.toggle('is-active')
body.classList.toggle('lock-scroll')
}