Comments (4)
I think if you did initialized data-scroll="out" on the elements, that would get you the transition.
People with JavaScript turned off would never see these elements, so whether that is okay or not depends on your situation.
You might be able to add a class to the html itself and then remove it in the onShown(el) event handler and that might give you a safe way to start the animation on startup.
from scroll-out.
OK, will mess with that. Unrelated, is it possible to have a negative offset without using CSS vars? Let's say I have a sticky have and I want to collapse some elements when I am halfway through the element.
from scroll-out.
You can set a threshold when you initialize ScrollOut({ threshold: .8 }) which is the amount visible before it is considered "in". https://scroll-out.github.io/guide.html#configuration
If this is for the navigation on the site. I would recommend looking at the offset property instead. It is important to note that you can initialize ScrollOut more than once to target different things provided you add the targets property instead of relying on data-scroll for the secondary targets.
from scroll-out.
Closing due to inactivity. If you have further questions, please comment and reopen this issue.
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
- "offset" calculation issue HOT 1
- 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.