Jump to content
Search Community

splittext revert is erasing spans that were there before

ericshew test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi there,

 

I'm using splittext and wanting to animate a passage of text and then to underline a key region within that text. It looks like the split text function deletes the span I had used before because I'm not seeing it within the array of stuff it creates or in the text string that appears once I revert. I can provide a codepen if needed but I just wanted to make sure. Please let me know if I need to. Thanks! 

Link to comment
Share on other sites

Yeah, providing a CodePen demo is best. This way we can see your actual code and don't have to build something from scratch guessing how you did it.

I'm not exactly sure what the problem is, so seeing it is best.

 

Go ahead and fork this pen:

 

See the Pen pEKYVz by GreenSock (@GreenSock) on CodePen

 

 

As you can see it already splits and reverts text with nested spans

  • Like 2
Link to comment
Share on other sites

@ericshew replied via email and said: 

 

Quote

"Whoops... I was being a big dummah. I was using an array to store a series of quotes and I was using the TEXT command where I should have been using HTML.  This was my first time with Splittext and I saw that the embeds weren't supported on earlier versions and I assumed the error was in the plugin. My mistake!"

 

  • Thanks 1
  • Haha 4
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...