Jump to content
Search Community

Trouble with implementing SplitText

madselsoe test
Moderator Tag

Recommended Posts

Hi guys,

 

I am a beginner in front end development, and currently taking a course on SuperHi to learn HTML, CSS and JS. I am trying to use the SplitText-plugin, but I can not get it to work. The regular GSAP plugin is working fine. 

 

I am getting this error: SplitText is not defined.

 

Url to site: https://politiken-creative.superhi.com/

 

Can someone figure out what I am doing wrong? 

 

Thanks a lot, and sorry if my question is stupid 🙃

Skærmbillede 2020-05-25 kl. 22.02.50.png

Link to comment
Share on other sites

Hey madselsoe and welcome to the GreenSock forums! Thanks for supporting GreenSock by being a Club member.

 

The issue is simply that your main.js file is loaded before the SplitText JS file. Switch the order (so that the main.js file is after the SplitText file) and it should be defined :) There's a whole video of how to include GSAP with Club plugins on the installation page.

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