js scrollTo element code example
Example 1: javascript scroll to element
document.getElementById("divId").scrollIntoView();
Example 2: scrollintoview
element.scrollIntoView();
element.scrollIntoView(alignToTop); // Boolean parameter
element.scrollIntoView(scrollIntoViewOptions); // Object parameter