Skip to content

Not enough information in documentation #665

Answered by KingSora
ianthedev asked this question in Q&A
Discussion options

You must be logged in to vote

@ianthedev thanks for the feedback!

Your example code should work, I've created an example for you: https://stackblitz.com/edit/vitejs-vite-vvnfw1?file=main.js&terminal=dev

I also want to point out that the scroll event is just directly forwarded from the native scroll event. If you want to register you own scroll events or any other scroll related listeners you can do it like this:

const osInstance = OverlayScrollbars(document.body, {});
const { scrollEventElement } = osInstance.elements();
scrollEventElement.addEventListener('scroll', () => {

});

I'll add an dedicated section for this topic into the FAQ section in the docs.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ianthedev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants