Kayley Posted September 20, 2023 Posted September 20, 2023 I have anchors in place on my home page so that when someone clicks on links at the top, they are redirected further down the page. These work well on desktop, but are not working for mobile devices. When someone clicks on the links on a mobile device, they are just bounced back to the top of the page. Please Help!
tuanphan Posted September 22, 2023 Posted September 22, 2023 Hi, What is your site url? We can check easier 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!)
tuanphan Posted October 7, 2023 Posted October 7, 2023 On 10/4/2023 at 7:11 PM, Kayley said: Restorehopear.org You try adding this to Website Tools (under Not Linked) > Code Injection > Footer <!-- by @nhannhot-tuanphan --> <!-- fix anchor links on iOS --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(document).ready(() => { function scrollToAnchor(aid){ var aTag = $(aid); $('html,body').animate({scrollTop: aTag.offset().top},'slow'); } scrollToAnchor(location.hash); }) </script> 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!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment