Comments (1)
You are correct, it is based the offset between the top of the scrolling content and the scrolling container. The documentation is incorrect and needs to be updated (I'll take this as an action item and update it). This feature is intended for sticky nav bars, so that is why the documentation is written incorrectly that way.
It seems like you have located the correct place to put that logic: https://github.com/scroll-out/scroll-out/blob/master/src/main.ts#L105. I am open for PRs to provide this functionality since it seems pretty straightforward and instantly useful. This can be exposed as a new property perhaps:
ScrollOut({
visiblePixels: 150 // Number of pixels the target must overlap with the viewport.
})
from scroll-out.
Related Issues (20)
- onShown when 0.2 of element visible but onHidden when fully hidden? HOT 2
- Not working in Angular 9. Am I making any mistake HOT 6
- Multiple options (with Vue) HOT 3
- Not firing the animted class in EI11 HOT 1
- Recalculate offset on window resize? HOT 2
- It does not work with Animate.css as written in the documentation. HOT 1
- Multiple API configuration for separate elements within an instance of ScrollOut() ?
- Threshold elements not appearing at all on layout change HOT 3
- Website is not working (https://scroll-out.github.io/) HOT 1
- It triggers before i scroll to an element
- Elements detection behaviour changed when once option is true
- Working backwards, meaning working in the wrong direction. HOT 1
- Add class on data-scroll-dir-y="-1" [question]
- [QUESTION] Where exactly do I implement this when using it in React?
- scrollPercentY
- --scroll-percent-y on element
- Elements not appearing on scrolling
- data-scroll-dir-y dangerous to use on iOs HOT 2
- Threshold will never trigger for elements higher than (viewport รท threshold)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scroll-out.