Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- document.addEventListener('DOMContentLoaded', () => {
- const proMenu = document.querySelector('#footer .oxy-pro-menu'),
- menuContainer = document.querySelector('#footer .oxy-pro-menu-container')
- function checkForWindowResize() {
- clearTimeout(window.resizedFinished);
- window.resizedFinished = setTimeout(function(){
- if (window.innerWidth < 768) {
- proMenu.classList.add('oxy-pro-menu-open')
- menuContainer.classList.add('oxy-pro-menu-open-container')
- } else {
- proMenu.classList.remove('oxy-pro-menu-open')
- menuContainer.classList.remove('oxy-pro-menu-open-container')
- }
- }, 0);
- }
- checkForWindowResize();
- window.addEventListener('resize', checkForWindowResize);
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement