Andrewe
(Andrew)
February 8, 2019, 1:23pm
1
Hey Guys,
Could you guys help me out? I’m trying to figure out if there’s code that would auto scroll down 1 pixel on page load so that it would trigger other animations in the viewport that are set to animate when scrolled into view.
Thank you, hopefully what I wrote made sense.
Have a wonderful day.
Here is my public share link: LINK
(how to access public share link )
dram
(Alex Dram)
February 8, 2019, 1:31pm
2
Here is what you can try putting into the before </body> tag
field in your custom code settings.
<script>
$(document).ready(function(){
var scroll = $(window).scrollTop();
scroll = scroll + 1; //pixels to scroll
$('html, body').animate({
scrollTop: scroll
}, 100); //scroll speed in ms
});
</script>
Andrewe
(Andrew)
February 8, 2019, 1:37pm
3
@dram - Thank you so much man, I really appreciate you taking the time in your day to help me out. (:
Have a wonderful day!
2 Likes