fixed js bug

master
A1Gard 2 weeks ago
parent bc061e7ecb
commit 6435c0a641

@ -1,5 +1,6 @@
const scrollBreakpoint = window.innerHeight * 0.2;
let fixmenu = function () {
try {
if (window.scrollY > scrollBreakpoint){
document.querySelector('.HomayonMenu').classList.add('fix');
document.querySelector('.HomayonMenu').querySelector('.homayon-middle').classList.remove('container');
@ -7,6 +8,9 @@ let fixmenu = function () {
document.querySelector('.HomayonMenu').classList.remove('fix')
document.querySelector('.HomayonMenu').querySelector('.homayon-middle').classList.add('container');
}
} catch {
}
}
window.addEventListener('scroll',fixmenu);

Loading…
Cancel
Save