Today I'm trying to implement an animation that, when a button is clicked, begins to smoothly transition from section to section. For work, I chose Scrollify. I wrote a simple example code to move from section to section after a certain period of time. And everything works, if not for one thing.
In my project there are sections that are much higher in height than the height of the user screen. And when using this animation, half of the content is simply skipped. If there is a way to fix this? Smooth scrolling within a section? There is a possibility of writing a separate function that will scroll through the content inside the section.
My code:
var counterValue = 0;
function toNextWin(){
if (counterValue < 10) {
counterValue++;
$.scrollify.next();
setTimeout(toNextWin, 2000);
}
}