failbetter Posted February 1, 2022 Share Posted February 1, 2022 Site URL: https://calliope-trout-pzeh.squarespace.com/home-scroll https://calliope-trout-pzeh.squarespace.com/home-scroll PW: rorymory Is it possible to make a page scroll automatically to the next section after a few seconds? This is what i have in the footer so far: <script> $(document).ready(function () { var myInterval = false; myInterval = setInterval(AutoScroll, 3000); function AutoScroll() { var myScroll = $(window).scrollTop(); myScroll = myScroll + 600; $('html, body').animate({ scrollTop: myScroll }, 1000); } $(window).scroll(function () { var myScroll = $(window).scrollTop(); if (myScroll == 0) { myInterval = setInterval(AutoScroll, 2000); } if (myScroll + $(window).height() == $(document).height()) { clearInterval(myInterval); } }); }); </script> but id like it to scroll to each section instead of just moving every three seconds. also would it be possible to also have arrows or scroll indicator to override it as well? @tuanphan @creedon?? Link to comment
failbetter Posted February 2, 2022 Author Share Posted February 2, 2022 On 7/7/2020 at 3:31 PM, tuanphan said: Can you share link to your site? We can help easier. or you can try this code /* footer color */ footer.sections .section-background { background: transparent !important; } /* footer text color */ footer.sections * { color: white !important; } /* footer social */ footer.sections * { fill: white !important; stroke: white !important; } 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