+ 4
Automatic Scrolling.
Anyone knows a function to automatically scroll this webpage? When the text goes outside the screen, that is... https://code.sololearn.com/Wd11EJWU7Zo6/?ref=app
4 Answers
+ 3
let ctnrElem = document.getElementById("container");
ctnrElem.scrollTop = ctnrElem.scrollHeight;
https://code.sololearn.com/W35wQ3nWJccr/?ref=app
+ 12
An alternative solution to Gordon code is to add the following at the bottom of generate() function
document.getElementById("strnd").scrollIntoView({block: "end"});
+ 7
Gordon đŹ
+ 4
Burey wow, learned something new, thanks.