jquery-endless-scroll icon indicating copy to clipboard operation
jquery-endless-scroll copied to clipboard

Infinite scroll up/down parameterization

Open digreamon opened this issue 10 years ago • 3 comments

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 avatar Feb 17 '15 17:02 digreamon

+1

clamoris avatar Apr 07 '15 12:04 clamoris

Is this functionality appears ?

dellert avatar Feb 29 '16 14:02 dellert

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

sherinjose avatar Jul 14 '16 12:07 sherinjose