Jump to content
Search Community

SplitText addClass on Start

anteksiler 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

The problem I have with SplitText is before I do something like below:

tl.staggerFrom(p.lines , 0.4, {
				  autoAlpha: 0,
				  delay: 0.5,
				  y: 20
				}, 0.1);

is that the lines are visible at first, so I need to hide them using css, but since SplitText does not addClass to the original container, I am having problem hiding the original lines.

 

Link to comment
Share on other sites

I'm not sure I totally understand the issue.

However, you can use css to hide the target of your SplitText when the page first renders and then later show it when you need it.

 

This demo waits 1 second to split the text and animate it in from autoAlpha:0

 

http://codepen.io/GreenSock/pen/zBbNLq?editors=0110

 

If you need something different please fork that demo so that we can better understand what you are doing. thanks.

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