| Server IP : 104.21.26.206 / Your IP : 216.73.216.227 [ Web Server : Apache System : Linux frog 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web13 ( 5017) PHP Version : 8.3.31 Disable Function : NONE Domains : 41 Domains MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/clients/client12/web13/web/ahelos/resources/frontend/js/ |
Upload File : |
if (checkIfExists('.categories__container')) {
/* Navigation scroll effect */
let scrollPosition = 0;
let ticking = false;
const header = document.querySelector('header')
const catBtn = document.querySelector('a[data-toggle-cats]')
const catContainer = document.querySelector('.categories__container')
const productCategoriesContainer = document.querySelector('.product__categories')
const navBottom = document.querySelector('.bottom')
function catBtnListener(e) {
e.preventDefault()
productCategoriesContainer.classList.toggle('cat-open')
}
catBtn.addEventListener('click', catBtnListener)
function scrollCallback(e) {
if (!ticking) {
window.requestAnimationFrame(() => {
if (scrollPosition < 500) {
header.classList.remove('scrolling-up', 'scrolling-down')
// catContainer.classList.remove('cat-close')
navBottom.classList.remove('navigation-shadow')
// catBtn.removeEventListener('click', catBtnListener)
}
if (scrollPosition > 500) {
// catBtn.addEventListener('click', catBtnListener)
navBottom.classList.add('navigation-shadow')
}
if (scrollPosition > window.scrollY) {
const difference = scrollPosition - window.scrollY
if (difference < 30) {
header.classList.add('scrolling-up')
}
} else {
if (scrollPosition > 500) {
header.classList.remove('scrolling-up')
header.classList.add('scrolling-down')
// catContainer.classList.add('cat-close')
}
}
scrollPosition = window.scrollY;
ticking = false;
});
ticking = true;
}
}
window.addEventListener('scroll', scrollCallback)
}