Jump to content
Search Community

Registering SplitText Plugin breaks JS?

cheestudio test
Moderator Tag

Recommended Posts

Not entirely sure how I can replicate and demonstrate, since I'm using an entire Gulp build system to compile our JS, but I am utilizing SplitText and registering the plugin this way:

 

gsap.registerPlugin(ScrollTrigger, SplitText);

 

Which once compiled, starts to introduce a slew of JS errors (not necessarily related, just stuff that happens down the line).

 

If I switch to this, everything works fine, including all my SplitText functions:

 

gsap.registerPlugin(ScrollTrigger);

 

I am fine with leaving it out, but I'm curious why this happening, since it seems to be the "correct" way to implement GSAP plugins? And even more curious that registering ScrollTrigger does not incur any errors?

 

Link to comment
Share on other sites

That does sound pretty odd. Not sure what to tell you without seeing a minimal demo. Sorry, I wish I had more to go on. You're absolutely positive that the "SplitText" that you're registering there is indeed the GreenSock file, right? Not some other 3rd party object or a variable you created? I'm totally taking shots in the dark here. 🤷‍♂️

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