Open zoombree opened 2 years ago
Hi,
try something like that : if (instance) scroll is superior at "amount of pixel you want" do something, else do something else.
I have made a sticky menu like that.
let DynamicMenu = document.getElementById("Show-hide-menu");
scroll.on("scroll", (instance) => {
if (instance.scroll.y > 360) {
DynamicMenu.classList.add('show-menu');
}
else {
DynamicMenu.classList.remove('hide-menu');
}
Hi All , I have a jquery snippet used to hide/show navbar based on scroll position, unfortunately, it stops working when using "LOCOMOTIVE"
this is the main var used to build logic: var position = $(window).scrollTop()
thanks for your time & support.