Jump to content

Scroll to anchor jumps back to wrong section

Recommended Posts

Hello, I am building  a single page website where I have added a custom navigation to the top with anchor links that make the page scroll to their specific section.

Everything works fine except the third and last link, supposed to send you to the contact form, last section before the footer.
When clicked it scrolls to the wrong place, on a section before the correct one. It goes to the right spot just on the second click.

I have tried with 3 different coding solutions, all involving jQuery and they all behave the same way. 

Any idea why this could be happening?

Thanks 🙂

Link to comment
20 hours ago, erikabarichello said:

Hello, I am building  a single page website where I have added a custom navigation to the top with anchor links that make the page scroll to their specific section.

Everything works fine except the third and last link, supposed to send you to the contact form, last section before the footer.
When clicked it scrolls to the wrong place, on a section before the correct one. It goes to the right spot just on the second click.

I have tried with 3 different coding solutions, all involving jQuery and they all behave the same way. 

Any idea why this could be happening?

Thanks 🙂

What is your site url

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace (+100 Spark plugin customisations)
🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

Link to comment
12 hours ago, erikabarichello said:

Hi @bangank36, this is the link: https://dms-music-education.squarespace.com

pass: dms21

The problem is with the "contact" link.

I really don't know what to do anymore, I've even duplicated the website and put all the elements within the same section, it behaves the same. 🥲🥲🥲

It looks like contact link works here. Did you solve problem?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...

Hi, no, I still have to solve the problem... I created a copy of the website where I have tested at least 4 different solutions (3 in jQuery only) and one following a post here on the forum. They all behave the same way, with only the last link working weirdly...

I kept the solution that seems working slightly better.... but the problem with the last section persists on mobile...

here's the copy of the website: https://bison-seadragon-lw9j.squarespace.com
pass: 1234

the title of the last section hides underneath the navigation bar (which is yellow and a little transparent for testing reasons...)

I can share the code I am using if anybody thinks it might help.

 

Thank you!

 

 

Link to comment
  • 8 months later...
On 4/29/2022 at 5:05 AM, tigerlily09 said:

I am experiencing the same problem. Does anyone have a solution? One of my anchor links keeps jumping to the tail-end of the prior section. See here. The anchor link's code block is situated right at the start of the footer.

You mean it should scroll to footer, not "Ready to the demo section"?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
9 hours ago, tuanphan said:

You mean it should scroll to footer, not "Ready to the demo section"?

No, it should scroll to "Ready to demo" section. But upon clicking "demo" in the navigation immediately upon landing on the site, it scrolls to this spot:

1689237745_ScreenShot2022-05-01at10_12_32AM.thumb.png.babae1e4a2886c83fb89e31b4c19e573.png

When you click "demo" in the navigation a second time, it scrolls correctly. But upon first click, it is not scrolling to where I have positioned by anchor link code. I tried moving the anchor link's code block to the start of the footer, but the "demo" button in the navigation still consistently lands on the spot shown in the image above.

Edited by tigerlily09
Link to comment
  • 4 months later...
  • 9 months later...
22 minutes ago, SmallSitesSarah said:

Bump. I'm having the exact same problem as well. The first click stops way before the anchor. On the second click, it scrolls to the correct place on the page. 

For posterity: I removed the code for smooth scroll, and the jump links goes to the right place on the first click now. Just without the nice scrolling effect. 

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.