Giter Site home page Giter Site logo

Comments (8)

ndimatteo avatar ndimatteo commented on July 27, 2024

Also would be good to have some sort of destroy() method.

from scrolltrigger.

terwanerik avatar terwanerik commented on July 27, 2024

Yeah i like this idea, i'll implement this (hopefully) this weekend.

from scrolltrigger.

ndimatteo avatar ndimatteo commented on July 27, 2024

Thanks! Looking forward to it :)

from scrolltrigger.

ndimatteo avatar ndimatteo commented on July 27, 2024

Any updates on this? Would love to get this implemented so I can tie up some issues with my projects using scrollTrigger :)

from scrolltrigger.

terwanerik avatar terwanerik commented on July 27, 2024

Fixed all these issues! Check the release for more info.

Thanks for the input!

from scrolltrigger.

ndimatteo avatar ndimatteo commented on July 27, 2024

Thanks @terwanerik, but it doesn't seem to be working?

I'm calling .resetAll() on the instance and now my scrollTriggers don't react to anything at all.

To elaborate, I left my code the same, and simply updated the scrollTrigger script and called the .resetAll() when my content loads. This kills the scrollTriggers.

You can check it here: http://dev.nickdimatteo.com/twenty-over-ten

I know that it's being called because I console.logged where it's being called and you can see it logs properly. Any ideas?

Really love this script and would love to wrap this up, thanks!

from scrolltrigger.

ndimatteo avatar ndimatteo commented on July 27, 2024

Apologies @terwanerik I think I was misunderstanding the new methods, can you confirm that this would be the best way to refresh my scrollTriggers?

scrollTrigger.resetAll().bind(document.querySelectorAll('[data-scroll]'));

from scrolltrigger.

terwanerik avatar terwanerik commented on July 27, 2024

Yeah that would be a way, even faster would be destroyAll instead of resetAll.

from scrolltrigger.

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.