Not so long ago I saw one of the developers I work with writing a very complex function to allow a smooth scrolling to a lower element on the page. I was quite surprised that he doesn’t use
scrollIntoView() and his
behavior parameter and its
smooth value. Did you heard of it?