scroll-depth
scroll-depth copied to clipboard
Feature request
How about combining percentage and element to track, so you can track the percentage scrolled of a tall element vs. the whole page. My use case is that our site has a huge footer, so a user may reach 50%, but have consumed the content and moved on.
I am looking for this as well
I don't quite follow. Do you mean being able to specify the container that's used to calculate the max scroll distance instead of using the document height?
Correct. Thanks!
Got it, thanks. On the v2 branch I added an option to define the container element as well as an option to ignore certain elements (eg footer): https://github.com/robflaherty/scroll-depth/commit/25bba4f3fc1905f4ce9941e861930dd9c4373c2a
I'm also looking for this. @robflaherty , do you have plans to backport this to v1? Thanks!