Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to detect slim scroll to top event? #295

Open
RahmaMzoughi opened this issue Jan 4, 2018 · 2 comments
Open

Is there a way to detect slim scroll to top event? #295

RahmaMzoughi opened this issue Jan 4, 2018 · 2 comments

Comments

@RahmaMzoughi
Copy link

I want to know if there is an option that let me detect if the user is scrolling to top or scrolling down ?

@philipstratford
Copy link

Do you mean that you want to know if the user scrolls all the way to the top or the bottom, or that you want to know if the user is scrolling up or down? They're two different things.

In any case, according to the documentation the only event built in to the plugin is the slightly generically-named slimscroll event, fired when the scrollbar reaches the top or the bottom of the parent element. Maybe you could make use of that to achieve what you need. If not, you'd have to write something yourself.

@DevVIN
Copy link

DevVIN commented Jun 15, 2020

@RahmaMzoughi Yes there are two things in your question

  1. If you just want to know if the user is scrolling to top or scrolling down then there is a solution which I got here stackoverflow
  2. If the user is scrolled to bottom or top then you should try this
    $('.slim-scroll').on('slimscroll', function(e, pos){ console.log(pos); }); with some additional modifications listed here in the plugin itself depending on the jquery version you using

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants