Jump to content
Search Community

Compatibility issue between Scrolltrigger and wordpress theme using Scrolltrigger

Pauline Brothier test
Moderator Tag

Recommended Posts

Hi ! 

I'm working on a wordpress website using the Rehub Theme which using Scrolltrigger. 

I created a custom section in html/css and js inspired by the codepen I send. It's an animation using Scrolltrigger and Lottiefile.  

My issue is that after my custom section, the other animations using Scrolltrigger doesn't works.

The other animations are displaying by the theme. 

I don't know if there is a compatibility problem or if I have to kill my animation at the end. 
This is the url you can see the all thing : #

Thanks

See the Pen 96ec6e6dadf7b73d11e38cda125d8920 by akapowl (@akapowl) on CodePen

Link to comment
Share on other sites

15 minutes ago, Pauline Brothier said:

Yes, sorry. My question is do I need to add something to my code to avoid interfering with other elements using Scrolltrigger?

 

No. As you can see in your demo it works fine. Some things that can mess up ScrollTriggers is creating them in wrong order, using nested ScrollTriggers, not calling ScrollTrigger.refresh() after the layout has changed, or having a trigger inside an element that gets pinned by another ScrollTrigger. Most of those topics are covered in the Most Common ScrollTrigger Mistakes article. 

 

Outside of those, it's really hard to advise how to troubleshoot a live site, especially if you said a theme is doing that. I would also try use the theme's GSAP and ScrollTrigger JS files instead of your own. Maybe those are conflicting. 

 

Link to comment
Share on other sites

  • 1 month later...
On 3/25/2022 at 7:40 PM, Pauline Brothier said:

Thanks for your help, I will read the link you send me and try to figure it out :) 

 

Hi. I am one of developer of Rehub. If you don't use the same classes as in Rehub GSAP related blocks, then, your animation should work independently. P.s. Rehub has also Lottie block with enabled GSAP scroll possibilities (in Elementor) and new Interaction library for Lottie in Greenshift editor, so, you don't need any extra code for such task

  • Thanks 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...