Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
});
 
PREVIOUS NEXT
Tagged: #js #scrolling #div
ADD COMMENT
Topic
Name
9+6 =