Jump to content

Wondering if this is possible? Sticky subnav with anchor links that have "active" states?

Recommended Posts

URL: https://www.jconstantino.net/see/jnf/styleguide

Hey all. I am trying to add some customization to this page. Currently, you can see right above the first image a line of text that reads "brand style guide" which is currently a header for the first set of images. Lower on the page, there's another header for "editorial templates" for the next set of images.

The easy part that I don't need help with: I'd like to make the first header ("brand style guide") a subnav of sorts and add "editorial templates" next to it. I'd then like to make each an anchor link for each section, and have that subnav section stick at the top of the window as you scroll down, as I already have happening on this page

The part that I DO need help with: I'd like each subnav link/anchor link to have an active state when clicked, but I'd also like the active state to change as the user scrolls down to the relevant section. For instance, if someone starts at the top of the page and scrolls down to "editorial templates", I'd like the active state styling to apply to the associated anchor link for that content. 

Can anyone possibly help with something like this? Thank you in advance!

Link to comment
  • Replies 1
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.