Answer the question
In order to leave comments, you need to log in
How to listen to scroll up and add a class?
I make a function when the Header is hidden at a certain moment of scrolling down (in the example 250px), and I need it to be shown back on any scroll up movement (and not again when this point is reached 250px).
How can I make it so that when the user scrolls up, for example by 50px, a trigger fires and adds the headroom--pinned class (or removes headroom--unpinned)?
https://codepen.io/kodekrendel/pen/XRpXej
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question