dreaming123 Posted March 23, 2022 Share Posted March 23, 2022 Site URL: https://www.thedreaming.co.uk/ Hey guys! I've set up coded anchor links on my website, each title in the navigation has them and they all scroll smoothly to the correct area. However, when you click the 'register your interest' button on the homepage, it scrolls to an incorrect section where there is no code. If you then scroll back to the top of the page after this and hit the 'register your interest' button again, it correctly takes you to the code block. This happens on both Macbook Chrome and iPhone Safari. I've tried all manner of anchor link coding options suggested in these forums, and the current code on the Register Your Interest section is <p id="connect"></p>, the button link at the top links to #connect. Any help would be amazing! Head to the site www.thedreaming.co.uk to see the behaviour for yourself, again this only happens with buttons and not navigation anchor links. Thanks! Elliot. Link to comment
dreaming123 Posted March 23, 2022 Author Share Posted March 23, 2022 UPDATE: As a workaround, I tried moving the section to the exact incorrect spot the button was jumping to, however it is now scrolling to another incorrect spot above the section. So it seems, the anchor link within the button the first time it's clicked will take you to a predetermined spot well above the correct section, but correctly to the actual destination upon second click. Link to comment
dreaming123 Posted March 23, 2022 Author Share Posted March 23, 2022 I've also tried action the section and block ID's and eliminating coding for the section, and it's behaving in the same manner, very perplexed by this! As the website needs to go live today, I'll remove the button and just have a navigation title possibly, any help would be appreciated massively! Link to comment
dreaming123 Posted March 23, 2022 Author Share Posted March 23, 2022 I've now realised the issue here is the smooth scrolling code, if I remove this it works every time, unsure if this is a known limitation? Until I can find a resolution I'll have to remove smooth scrolling. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment