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

Infinite scroll up/down parameterization #47

Open
digreamon opened this issue Feb 17, 2015 · 3 comments
Open

Infinite scroll up/down parameterization #47

digreamon opened this issue Feb 17, 2015 · 3 comments

Comments

@digreamon
Copy link

I have came up with an idea of parameterization of the scrolling functionality.

  1. add scrollMode to options. It should be set to one of the following:
    • "next" -- detect only downwards scrolling;
    • "prev" -- detect only upwards scrolling;
    • null -- detect both downwards and upwards scrolling;
  2. change logic of the detectScrollDirection function:
    1. remove
      javascript this.didScroll = true;
      before the if-block;
    2. add
      javascript this.didScroll = this.options.scrollMode ? this.options.scrollMode === this.scrollDirection : true;
      after if-block;

This will set didScroll to false in case of unneeded scroll event

@digreamon digreamon changed the title Infinite scroll up/down Infinite scroll up/down parameterization Feb 17, 2015
@clamoris
Copy link

clamoris commented Apr 7, 2015

+1

@dellert
Copy link

dellert commented Feb 29, 2016

Is this functionality appears ?

@sherinjose
Copy link

This was an awesome functionality from you @digreamon . Well done :)

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

4 participants