New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Trigger animation on page load #21
Comments
I think if you did initialized data-scroll="out" on the elements, that would get you the transition. 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. |
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. |
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. |
Closing due to inactivity. If you have further questions, please comment and reopen this issue. 😄 |
I might be missing this in the documentation, but is it possible to trigger the animations once the page loads? Right now I have elements that are being watched by Scroll Out that are already in the viewport when the page loads. I would like them to animate in as if they were moving into the viewport, I hope that makes sense.
I can email you the site if you need to see an example.
The text was updated successfully, but these errors were encountered: