Jump to content

Anchor Link On One Page Website Works on Desktop but Not Mobile.

Recommended Posts

  • Replies 6
  • Views 956
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

What custom code are you using to perform the scroll?

👨‍🔧👨‍💻 Contact me for development work - I’m a Freelancer Software engineer, Architect, and Designer UI/UX

🙋‍♂️ Squarespace Custom Web Development & Design

📅 Manage Tasks, Take Notes, and Upload Related Images

📹 Squarespace Tutorials for free - YouTube📹 

💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years

🙋‍♂️ Let's connect on LinkedIn

 

 

Link to comment

On mobiles, certain sections are hidden and the links from the navigation refer to them

Screenshot 2024-03-10 at 14.24.43.png

👨‍🔧👨‍💻 Contact me for development work - I’m a Freelancer Software engineer, Architect, and Designer UI/UX

🙋‍♂️ Squarespace Custom Web Development & Design

📅 Manage Tasks, Take Notes, and Upload Related Images

📹 Squarespace Tutorials for free - YouTube📹 

💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years

🙋‍♂️ Let's connect on LinkedIn

 

 

Link to comment

I used a bunch of different codes actually. And I landed on this one (I've changed the id for different sections like "about", which jumps to FACE OF THE BRAND and "contact", which jumps to "Lets' Connect" & "services" which jumps to "Services").

<a id="services" class="anchor-link">
  
</a>

It seems to work on desktop view but doesn't work on mobile view

Link to comment

On mobile the sections that contain them are hidden with CSS(display:none)

👨‍🔧👨‍💻 Contact me for development work - I’m a Freelancer Software engineer, Architect, and Designer UI/UX

🙋‍♂️ Squarespace Custom Web Development & Design

📅 Manage Tasks, Take Notes, and Upload Related Images

📹 Squarespace Tutorials for free - YouTube📹 

💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years

🙋‍♂️ Let's connect on LinkedIn

 

 

Link to comment
Posted (edited)

Oh yes, so what I did was, when I designed the website, the mobile view was not looking good and organised, so I had to duplicate the sections and design them as per mobile view, then using sections ids, I hid the mobile sections from the desktop view and vice versa.

But the mobile sections also contain the code, so it should jump to the section that I want it to. But why it isn't happening?

Edited by RidhiGupta
Link to comment

I think it tries to go to the first section that has the ID and those are hidden

👨‍🔧👨‍💻 Contact me for development work - I’m a Freelancer Software engineer, Architect, and Designer UI/UX

🙋‍♂️ Squarespace Custom Web Development & Design

📅 Manage Tasks, Take Notes, and Upload Related Images

📹 Squarespace Tutorials for free - YouTube📹 

💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years

🙋‍♂️ Let's connect on LinkedIn

 

 

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.