Jump to content
Search Community

Pinned layered divs with smooth ScrollTo

scavaliere test
Moderator Tag

Go to solution Solved by Shaun Gorneau,

Recommended Posts

  • Solution

Hi @scavaliere,

 

Two quick things.

  1. You can't start an id with a digit, it must start with [A-Za-z]
  2. Before scrollTo can do its thing in response to clicking on an anchor, you must first prevent the default behavior (which is to jump to the position of an element with a matching name or id)

See the Pen BapbRXv by sgorneau (@sgorneau) on CodePen

 

Hope this helps!

 

Shaun

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

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

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...