Jump to content

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

SplitText chars of each li in each ul

Recommended Posts

Hi again, my heros!


Okay, so, I'm looking for a more dynamic way to accomplish this.


I have a bunch of unordered lists that each need to animate-in separately (corresponding with some highlighted words in an h1), and I would like to animate them in by character, but also be able to pause after each line (list item) has completed. I know I can do this with a bunch of SplitTexts, but I'm positive there's a better way to do it than going line by line, right?


In my Pen, each unordered list comes in line-by-line. What I would like to do is: 

1. animate first keyword

2. stagger by-character first list item of first list

3. pause

4. stagger by-character second list item of first list

…repeat for all list items of first list, then repeat all for next keyword and next list.


A loop of some sort, perhaps? Thanks!




See the Pen OoRJxa?editors=1010 by jsciumi (@jsciumi) on CodePen

Link to comment
Share on other sites

Hi @jsciumi :)


If I understand your question correctly, I think you'd want to split with chars and lines. Then add a class to the lines with an incremented number. That will make it easy to loop through each <ul> and create a pause between lines. Maybe something like this:



See the Pen eLdNGx by PointC (@PointC) on CodePen

Does that help?


Happy tweening.



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