Hi all,
I'm searching for a better solution on a problem with permanent monitoring positions of page elements when scrolling.
I have a table with table header, where a copy of it in a fixed header should popup when the original header is out of the viewport. That works very nice with one table and one fixed header. But there are also pages with multiple of those objects, and I don't want to check for each table, if it is currently within the viewport, but its header out of it.
A much better aprouch would be, if I could check which object is currently at top of the viewport. But I haven't found any examples on the web. Maybe I used the wrong keywords for searching, but everytime I found something, it only was checking the scrolltop position of an object. I want to check at vertical position 0 or 100 of the viewport what object is there currently positioned. All my tables have IDs.
Does anybody has a hint or tip for me?