Jump to content
Search Community

Observer demo the latest section not showing

Steve Lu test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

Animated Continuous Sections with GSAP Observer (codepen.io)

 

In this demo codepen, the lastest section with class "fifth" not showing.

Anyone know how to fix it? 

 

And the Observer type, is it possible dynamic detect if the device support or not?

type: "wheel,touch,pointer",

Like desktop change to "wheel" only, and "touch,point" for mobile. 

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

Link to comment
Share on other sites

Adjusted it!

 

Quote

And the Observer type, is it possible dynamic detect if the device support or not?

In terms of this, if the device doesn't support wheel events observer won't throw any errors or anything, this is handled internally, it's like saying 'listen to these if they exist'

Link to comment
Share on other sites

20 hours ago, Steve Lu said:

And the Observer type, is it possible dynamic detect if the device support or not?

type: "wheel,touch,pointer",

Like desktop change to "wheel" only, and "touch,point" for mobile. 

Yeah, like Cassie said that probably isn't necessary, but just to point it out you can do this if you want: 

type: Observer.isTouch ? "touch,pointer" : "wheel",

👍

  • Like 2
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...