I have a list with lis. Every item has a corresponding object in a collection. When I start scrolling the list I wanna now whats the actual first visible item and whats its position in my collection. In my first version it was easy cause every item had has the same hight and I can just divide the scrollTop of the list by the height of an item. But in our new version every item could have a different height.
The problem is that it is an infinitely scrollable list and that it has to run on a mobile device. So maybe there are better solution then iterating over all items and sum up its height until its larger then the scrollTop of the list.
Are there common ways to handle that problem.
Ok I found an easy way using
document.elementFromPoint:Example