Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

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)

#250445
grimski
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?