Jump to content

Help with Anchor Links

Recommended Posts

Posted

Site URL: http://clover-fennel-ea3x.squarespace.com

Hi all,

I need a bit of help with the anchor links set up. I set up an anchor link to go to a specific part on my website with a smooth scroll feature which works great. However when I press the back button on my browser, it goes back to the part of the webpage where the anchor link button is placed, instead of going back to the previous webpage (in the video I shared, I would want it to go back to the home page instead). How can I make it so that instead of scrolling back up to the button, it just returns to the previous page I was on? I attached a video showcasing my issue to make things easier and just want to let y'all know that I have almost 0 coding experience so please go easy on me haha. Thank you all in advance.

website screen recording.mov

  • Replies 3
  • Views 974
  • Created
  • Last Reply
Posted
On 4/5/2021 at 11:53 AM, aksoma15 said:

Site URL: http://clover-fennel-ea3x.squarespace.com

Hi all,

I need a bit of help with the anchor links set up. I set up an anchor link to go to a specific part on my website with a smooth scroll feature which works great. However when I press the back button on my browser, it goes back to the part of the webpage where the anchor link button is placed, instead of going back to the previous webpage (in the video I shared, I would want it to go back to the home page instead). How can I make it so that instead of scrolling back up to the button, it just returns to the previous page I was on? I attached a video showcasing my issue to make things easier and just want to let y'all know that I have almost 0 coding experience so please go easy on me haha. Thank you all in advance.

website screen recording.mov 10.64 MB · 1 download

Which code did you use for the anchor link

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

Posted

Hello,

Here is my code setup for the anchor links. I set up a code block and set up the anchor command there and linked it to the button up on top.

Thanks for taking a look!

Screen Shot 2021-04-08 at 10.02.48 PM.png

Screen Shot 2021-04-08 at 10.03.04 PM.png

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.