Jump to content
Search Community

Scroll with Observer

Huy Nguyen 2K test
Moderator Tag

Recommended Posts

If you want to control what gets loaded on what screen size, check out GSAP matchMedia() https://greensock.com/docs/v3/GSAP/gsap.matchMedia()

 

And here is a pen that disables the observer when some conditions are met and then goes over in normal scrolling behaviour. Hope it helps and happy tweening! 

 

See the Pen oNdNLxL by GreenSock (@GreenSock) on CodePen

 

  • Like 2
Link to comment
Share on other sites

14 hours ago, mvaneijgen said:

If you want to control what gets loaded on what screen size, check out GSAP matchMedia() https://greensock.com/docs/v3/GSAP/gsap.matchMedia()

 

And here is a pen that disables the observer when some conditions are met and then goes over in normal scrolling behaviour. Hope it helps and happy tweening! 

 

 

 

 

But in my case, I can't disable observer because it's cause some problem. Is anyway to handle scroll on mobile with observer. Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...