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