- 1

How can i scroll a overflow: scroll; div automatically using Javascript?

27th Dec 2020, 5:50 PM
Alson Magar
Alson Magar - avatar
2 Answers
0
Hey there, you can call the .scroll() function on the div. https://developer.mozilla.org/en-US/docs/Web/API/Window/scroll
27th Dec 2020, 5:58 PM
skaltecho
0
I want the div only to scroll not the whole window. Is there a way of doing that? I used the .scrollTo() method on that div but didn't work.
28th Dec 2020, 5:37 AM
Alson Magar
Alson Magar - avatar