í element on screen scrolling js code example
Example 1: js scrolling in div
var divElement = document.getElementById("div");
divElement.scroll({
top: divElement.scrollHeight,//scroll to the bottom of the element
behavior: 'smooth' //auto, smooth, initial, inherit
});
Example 2: scroll js
window.scroll(x-coord, y-coord)
window.scroll(options)