scroll-depth icon indicating copy to clipboard operation
scroll-depth copied to clipboard

Feature request

Open purdy opened this issue 6 years ago • 5 comments

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.

purdy avatar May 23 '18 13:05 purdy

I am looking for this as well

ronnieduke avatar Mar 21 '20 01:03 ronnieduke

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?

robflaherty avatar Nov 20 '20 22:11 robflaherty

Correct. Thanks!

purdy avatar Nov 21 '20 02:11 purdy

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

robflaherty avatar Nov 21 '20 13:11 robflaherty

I'm also looking for this. @robflaherty , do you have plans to backport this to v1? Thanks!

brunorios1 avatar Nov 30 '20 20:11 brunorios1