ufotofu Posted January 28, 2023 Share Posted January 28, 2023 Hello. Is there a way to make an automatic smooth scroll from section 1 of the page to section 2 after a few seconds? Probably with javascript. Link to comment
Solution ufotofu Posted January 30, 2023 Author Solution Share Posted January 30, 2023 (edited) Solved it with this code setTimeout(function(){ $(window).scrollTo('section[data-section-id="your-unique-id"]')}, 3000); Edited January 30, 2023 by ufotofu Link to comment
grybitskaya Posted July 28, 2023 Share Posted July 28, 2023 That's great. But where do you paste this code? It doesn't work in CSS. Thank you! Link to comment
tuanphan Posted July 29, 2023 Share Posted July 29, 2023 22 hours ago, grybitskaya said: That's great. But where do you paste this code? It doesn't work in CSS. Thank you! Add this to Settings > Developer Tools > Code Injection > Footer. Replace with your data-section-id <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> setTimeout(function(){ $(window).scrollTo('section[data-section-id="your-unique-id"]')}, 3000); </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!) 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