Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
celli

SplitText Plugin with hosted plugin

Recommended Posts

I can get GSAP3's splitText plugin working fine on CodePen with the CodePen plugin URL https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/SplitText3.min.js 

 

I have a Greensock membership, so I have the plugin hosted and local -- but it throws and error, even if I use my hosted plugin URL on CodePen.

 

I tried registering the plugin like this

gsap.registerPlugin(SplitTextPlugin);

 

I still get this error on the SplitText.js file :

"Uncaught SyntaxError: Cannot use import statement outside a module"

Then of course I get the error that SplitText is not defined

 

Any ideas why I am not able to use it outside of codePen ?

 

See the Pen eYmGYZQ by celli (@celli) on CodePen

Share this post


Link to post
Share on other sites

Hey celli.

 

It sounds like you're trying to use the modules version. Try using the UMD version instead. They are meant to be loaded in a browser normally using a <script> tag.

  • Like 1

Share this post


Link to post
Share on other sites

perfect, that worked ! I knew it had to be something simple. I didn't realize that. Thanks!

  • Like 1

Share this post


Link to post
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.

×