double scroll bar – locomotive
-
Hi! I’m trying to figure out how to use the “locomotive” library properly and after some research i’ve added this code to add a class to my header when the page is scrolled:
<script type="text/javascript"> window.addEventListener("load", () => { setTimeout(()=>{ let locoScroll = new LocomotiveScroll({ el: document.querySelector('[data-scroll-container]'), smooth: true }); locoScroll.on('scroll', (position) => { if ((position.scroll.y) > 50) { document.querySelector('#we-header').classList.add('scrolled'); } else { document.querySelector('#we-header').classList.remove('scrolled'); } }); }, 500); }); </script>but after that i have two scrolls in my page
does anyone knows how to fix this?
thanks a lot.
The page I need help with: [log in to see the link]
The topic ‘double scroll bar – locomotive’ is closed to new replies.