Line 181: | Line 181: | ||
menuBtn.classList.add('open'); | menuBtn.classList.add('open'); | ||
menuOpen = false; | menuOpen = false; | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | $(window).scroll(function(){ | ||
+ | if($(document).scrollTop() > 20){//Here 200 may be not be exactly 200px | ||
+ | document.querySelector(".menu").classList.add("menu_hidden"); | ||
} | } | ||
}); | }); |
Revision as of 16:04, 29 August 2021