Answers for "how to scroll in a div using javascript"

7

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
});
Posted by: Guest on July-11-2020

Code answers related to "how to scroll in a div using javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language