GithubHelp home page GithubHelp logo

Comments (4)

notoriousb1t avatar notoriousb1t commented on May 13, 2024

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.

love-digital avatar love-digital commented on May 13, 2024

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.

notoriousb1t avatar notoriousb1t commented on May 13, 2024

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.

notoriousb1t avatar notoriousb1t commented on May 13, 2024

Closing due to inactivity. If you have further questions, please comment and reopen this issue. ๐Ÿ˜„

from scroll-out.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.