Jump to content

Smooth scrolling for anchor links does not work on links in folders

Recommended Posts

Site URL: https://lemon-grape-sy9n.squarespace.com

Hi,

I am strugling with smooth scroll on anchor links placed in folders for my nav menu. The scrolling effect works when you already are in the folder, but when visiting the front page, for then visiting a link in a folder in "about us", the scrolling effect will not work, and the page will not show up (react) to the cursor clicking on the link.

This happens when I place my jquery script in the "Code injection" header. If I remove the code, all links and pages works fine when pointing the cursor, clicking on each page and links. But I really want this code to work, so every anchor link and scroll to top button scrolls to the specific codeblock for each section.

Can someone please help me figuring out what is wrong in the code?

Link to comment
On 3/13/2021 at 8:31 AM, Hjanrobert said:

Site URL: https://lemon-grape-sy9n.squarespace.com

Hi,

I am strugling with smooth scroll on anchor links placed in folders for my nav menu. The scrolling effect works when you already are in the folder, but when visiting the front page, for then visiting a link in a folder in "about us", the scrolling effect will not work, and the page will not show up (react) to the cursor clicking on the link.

This happens when I place my jquery script in the "Code injection" header. If I remove the code, all links and pages works fine when pointing the cursor, clicking on each page and links. But I really want this code to work, so every anchor link and scroll to top button scrolls to the specific codeblock for each section.

Can someone please help me figuring out what is wrong in the code?

what is your page url

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • 2 weeks later...

I have a similar problem too - in an original build of my website back in 2016 my anchor links would smoothly scroll but now they jump immediately, which is a bit jarring.

See "Family", "Wedding" and "Newborn" on this webpage https://www.alexcosseyphotography.com/faqs

I m using the Code image block and the following code:

<div id="family-faqs">
  
</div>

 

Any advice would be greatly appreciated!

Edited by AlexCossey
Link to comment
17 minutes ago, AlexCossey said:

I have a similar problem too - in an original build of my website back in 2016 my anchor links would smoothly scroll but now they jump immediately, which is a bit jarring.

See "Family", "Wedding" and "Newborn" on this webpage https://www.alexcosseyphotography.com/faqs

I m using the Code image block and the following code:

<div id="family-faqs">
  
</div>

 

Any advice would be greatly appreciated!

I still see the link animating to the end of the page

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

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.