Navbar colour change on scroll (SOLVED)


I’m guessing the answer is pretty straight forward, but it’s eluding me…

I have a sticky navbar on a one page site and would like its background colour to change while scrolling. Anybody know the correct class syntax (if it is controlled by custom classes) to target it?


Check out the video by @Eldar here.


As @hendon52 that video is a handy reference.

But your question is a little vague also, more detail can help with the response. Such as what are you actually trying to achieve. If you want the navbar to change multiple times as you scroll to different sections of the page, that requires a different method for example.

Thanks, just what I was looking for.

I just needed the navbar background to change from its static, start position colour to a different one when scrolling. Eldar’s vid explains how to do it.

1 Like