Closed JiveDig closed 5 years ago
Hey @JiveDig, what's wrong with the current inside
/outside
callbacks? https://github.com/electerious/basicScroll#data
Hey @electerious those callbacks are amazing, and fit loads of use-cases. Maybe this screenshot will help clarify a little more power being added to basicScroll:
inside
and outside
are passing a percentage value to the function. 0% in outside
should be before and 100% should be after. Could be worth a try.
A dedicated callback for before
and after
isn't planned.
Ahh I must have missed it when i console.log() the percentage in the outside callback. It shows a negative percentage before, that's awesome. This is perfect, I can do everything I need as-is. Thanks!
First off, just found basicScroll and instantly loved it... nice work! I've spent a lot of time with ScrollMagic (really powerful) but really like the lightweight/variable approach here.
I'm thinking it would still be efficient but much more powerful/flexible to have a callback function when an instance/element was before and/or after inside/tracking.
I'm doing some trickery, as I should be with a library like this ;P - and want to do some stuff when outside the target but only after I have scrolled past it. So far, haven't found a logical and efficient way to do this without a lot of other code.