Home › Forums › JavaScript › Hide/reveal header on scroll (works but a bit jumpy) › Reply To: Hide/reveal header on scroll (works but a bit jumpy)
January 25, 2017 at 2:41 am
#250445
Participant
As an update to this, it looks like the “jump” caused if you scroll down too quickly is caused by the opacity
value. In addition to the invisible
and detached
classes being added by the javascript in quick succession.
.invisible
has a value of opacity: 0;
and .detached
a value of opacity: 1;
. My guess if that the navigation hasn’t moved itself fully off screen before the opacity is adjusted, making the element visible again?
Any ideas?