Jump to content
Search Community

accordion and scrolltrigger conflict

GsapNewbie test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

Hi,

 

I am using alpinejs and tailwind to create an accordion and on another section am using scrolltrigger.

 

What I notice is, by default if the accordions are not open, the scrolltrigger works perfectly fine, once you click any of the accordion, especially those with more content, the scrolltrigger does not properly trigger.

 

please check the demo, am assuming I need to use scroller proxy? need a bit help on how to trigger it everytime one of the accordion item is clicked.

See the Pen RwqEYYz by dxbdevy (@dxbdevy) on CodePen

Link to comment
Share on other sites

Yes I see the accordions, but I don't see the code that makes them work. We like to scope these forums to GSAP related questions, thus it is up to you to find out how you can run this code ScrollTrigger.refresh() when a user clicks on an accordion, again that we can't help with, because the accordions are not made with GSAP, so I can't tell you how that would work, maybe the docs you've linked have the answers. 

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