How do I run the onclick function when the div becomes visible by the user scrolling to it. Trying to set up infinite scrolling that loads automatically instead of users clicking this button.
The elements scroll horizontally inside another div.
<div id="bottom_end" class="next">
<a onclick="load_more('/orderby/rising/page/12', '12', 'app_index')"></a>
<p>Load more<br>in scroll</p>
</div>