Jump to content
Search Community

Splittext and <pre>

fripi test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

  • Solution

Yeah, that's not really what SplitText is intended for - you've got a bunch of nested elements intermingled with text content. You could make it work by wrapping all the content in sub-nodes consistently (rather than mixing and matching). Wrap the "loose" stuff in <span></span> like: 

See the Pen mdLMxwb?editors=1010 by GreenSock (@GreenSock) on CodePen

  • Like 1
Link to comment
Share on other sites

2 hours ago, GreenSock said:

Yeah, that's not really what SplitText is intended for - you've got a bunch of nested elements intermingled with text content. You could make it work by wrapping all the content in sub-nodes consistently (rather than mixing and matching). Wrap the "loose" stuff in <span></span> like: 

Thank you Jack,

luckily it's a short snippet that needs to be animated :-D

So it was already very packed and by adding a lot of spans it works 🤪 it's great I love that plugin

 

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