Portfolio Project - jQuery Navbar?

Portfolio Project - jQuery Navbar?
0.0 0

#1

I’m just finishing up the Portfolio project for the Front End Dev course, and I’ve ticked all the boxes for the user stories.

However, I can’t seem to figure how to get the nav items to stay colored when it’s showing that section.

The navigation itself works, and takes you where it should, but the active section isn’t highlighted?

That also means i can’t offset the sections, so the headings tend to appear behind the navigation…

Here it is in codepen: https://codepen.io/JamieSilman/pen/WXBONa

I’d really appreciate it if someone could explain where I’ve gone wrong as I can’t seem to figure it out!

Thanks!


#2

Hi @Jamie_VW,
I forked your pen at https://codepen.io/bansal/pen/YEoLza. I have added a window onscroll function to achieve the same. Take a look if that solves your problem! Thanks


#3

or we can use scrollspy to achieve the same. I have a sample here at https://codepen.io/bansal/pen/mqZLmQ