Overflow
It is possible to have infinite scrolling pages inside an overflow element.
First define a container element.
1
<div id="scroller">
2
<div class="item">Item 1</div>
3
<div class="item">Item 2</div>
4
<!-- more items -->
5
</div>
Copied!
Then configure the overflow using css. Don't forget to give the element a fixed height.
1
#scroller {
2
overflow: scroll;
3
height: 200px;
4
}
Copied!
Then configure the element as scroll container.
1
let ias = new InfiniteAjaxScroll('#scroller', {
2
scrollContainer: '#scroller'
3
});
Copied!
Last modified 1mo ago
Copy link