Perfect-scrollbar: Get scroll amount?

Created on 26 Sep 2018  路  2Comments  路  Source: mdbootstrap/perfect-scrollbar

I am listening for the custom events and would like to know something like the pixels or percentage of how far I have scrolled from the beginning. Is this doable at the moment or something that could be added to the custom event data perhaps?

Most helpful comment

It just uses the scrollLeft property on the node with scrollbar. So you can just use yourHtmlElement.addEventListener('scroll', () => { yourHtmlElement.scrollLeft })

All 2 comments

I have the same question.

It just uses the scrollLeft property on the node with scrollbar. So you can just use yourHtmlElement.addEventListener('scroll', () => { yourHtmlElement.scrollLeft })

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zadremal picture zadremal  路  5Comments

gpluess picture gpluess  路  4Comments

eddieklc picture eddieklc  路  3Comments

Gurkirat2210 picture Gurkirat2210  路  5Comments

jaycbrf4 picture jaycbrf4  路  6Comments