superbenj Posted April 27, 2022 Share Posted April 27, 2022 I'm using the amazing scrollSmoother. but it seems to have a problem using the navigation on the same page. When you click a section from the navigation you can't return on top of this section. See the Pen qBpeNeG by superbenj (@superbenj) on CodePen Link to comment Share on other sites More sharing options...
Cassie Posted April 27, 2022 Share Posted April 27, 2022 Hey there! You were looking for the ID which wasn't returning anything, so smoother.scrollTo wasn't doing anything. The browsers normal anchor link scrolling behaviour was happening. See the Pen PoEMbdV?editors=1011 by GreenSock (@GreenSock) on CodePen You'll need to grab the href attribute and also prevent default! 3 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now