let toggle_menu = document.querySelector('.toggle-menu')
let menu_wrapper = document.querySelector('#menu_wrapper')
let currentURL = window.location.href
let menuLinks = document.querySelectorAll('.menu-item a')
let docBody = document.body

function toggleMenu() {
  toggle_menu.classList.toggle('active')
  docBody.classList.toggle('noScroll')
  console.log('No Scroll Activated')
  menu_wrapper.classList.toggle('expand')
}

function setActiveMenuLink() {
  menuLinks.forEach(function (link) {
    if (link.href === currentURL) {
      link.classList.add('active-highlight')
    }
  })
}

document.addEventListener('DOMContentLoaded', setActiveMenuLink)
