I've been trying to figure out how to add a loading scroll feature to my webpage, but I'm running into issues with the div not displaying correctly. Instead of loading underneath the scroll, the content pops up on the side as shown here when scrolling down.
The specific code causing trouble is:
if(y >= contentHeight-30){
movelist.innerHTML +='<div class ="newData"><center>hey look at me</center></div>';
}
I am aiming to append new content to the bottom of the scroll before reaching its end. Any advice or insights on how to achieve this would be greatly appreciated!