@dwddgsz
Posted
Hello. This function need 5 params. 'step' is responsible for smoothness, it's value in pixels that defines single movement, 'distance' defines overall scroll value in pixels. In your case it's 30 moves for one scroll (300px distance / 10 px for each step). Delay of each step is defined by 'speed' (read about setInterval). At the end of the scroll interval is getting cleared. 'element' and 'direction' are pretty straightforward I guess. I hope it helps
@Eduardo-Fuentes-Jr
Posted
@dwddgsz Hi! Yes this does help out a lot. I was confused with what speed distance and step did and I messed around with the numbers and researched but couldn't figure it out but it makes sense now! Thank you!