I'm wanting to add an continuous looping scroll to a list of text on page. So when the user gets to the last item of the list, the first item shows directly beneath as you scroll and so on. Scrolling up and down would be great. The scroll would be on the page rather than the parent container of the list.
I'm aware of the jQuery orientated solutions such as: Continuous Looping Page (Not Infinite Scroll), but was hoping to use a vanilla JS solution to dodge the performance overhead.
Here's example HTML:
<div class="wrapper">
<ul class="loop">
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<!-- THERE COULD BE LOTS OF LIST ITEMS -->
</ul>
</div>
This pen seems to have the answer. However when I begin to strip out the styles and replace with own the scroll stops working. I'd like this scroll to not be reliant on any decorative elements if possible.
I have a pen set up here: https://codepen.io/abbasarezoo/pen/pavxVd
Thanks in advance for any help!