on scrolling on/off
Hello,
I just discovered your script and it is pretty cool.
One thing that surprised me though is there seems to be no way to react to simple scrolls.
For instance adding a class to an element on scrolling and removing it when scrolling stops.
Am I missing something or is that function not included?
Either way, thanks for a great script.
Nour
Not explicitly, I can look into adding that. What do you imagine the API looking like?
Thank you for answering.
I suppose 2 .whenScrolling() and .whenScrollingStopped(delay) functions would work. The delay would be to estimate whether the user really stopped scrolling or not.
Also, I think the trigger on scroll should be triggered only once, not continuously.
I don't know if this is helfpful?
That will probably create a small problem and require a rewrite as you are testing for the type of the parameter and if it is a number you assume the function whenDistance() is called. So in the case of the whenStoppedscrolling() function there would be a problem as the argument would also be a number
@Tarabyte, any ideas?