How to implement show header on scroll up?

Searched, but didn’t find an answer.

I haven’t fully test this method, but should work. On your header, create two custom states, the first is a yes/no called Show Header and the second is a number called Last Scroll Position.

In the workflows tab, create a wf using the “do every 5 seconds” trigger and change the time to .1 seconds. In the workflow, add three actions. The first action is to set the state of Last Scroll Position. The value should be Current Scroll position. The second action sets the state of Show Header. Place a conditional statement to only when current page scroll position < Last Scroll Position. The state should be set to Yes. The third action sets the same custom state, but changes it to no when the current scroll position > last scroll position.

1 Like

Thanks. So this is running a workflow every 5 seconds just to get this behavior?

The default is 5 seconds, but you want to change it to .1 seconds. That way it is keeping up with your scrolling.

Thanks! Worked like a charm once I set the custom state for’ Last Scroll Position’ at page level, and the ‘Show Header’ state on the header itself and ‘yes’ as default state.