I’m trying to teach myself how to implement a loading scroll into my scroll, but I am having issues with the div being called. The content is not loading underneath the scroll, but instead pops up on the side and looks the part as seen here when scrolling down.
The code in question is
if(y >= contentHeight-30){
movelist.innerHTML +='<div class ="newData"><center>hey look at me</center></div>';
}
I want to append content to the bottom of the scroll before the bottom is reached. Any insight or tips would be extremely helpful and appreciated
Many errors in the code.
To answer your question:
You need to add
float:left;to your div.NewData. Check this fiddleSecond: To add comments in CSS you need to use
/* */and not<!-- -->.Commenting with
<!-- -->is not recognized by CSS so all that’s underneath will not be applied.Third: Ids are unique. All your
<li>have the same id. Use a class instead.