Hi , You can see in the codepen that i am trying to animate each LINE to move from right to the current point , you can see that "HI", "welcome" "home" and "friend" should be each line , but what i am getting is "Home friend" as a same line , am i doing something wrong?
See the Pen ELyoRR?editors=1010 by jeffin417 (@jeffin417) on CodePen
Sorry, but SplitText doesn't currently support "lines" on nested elements. However, I whipped together a utility function that should give you what you need:
function nestedLinesSplit(target, vars) {
target = gsap.utils.toArray(target);
if (target.length > 1) {
let splits = target.map(t => nestedLinesSplit(t, vars)),
result = splits[0],
resultRevert = result.revert;
result.lines = splits.reduce((acc, cur) => acc.concat(cur.lines), []);
result.revert =