Hi Jack, thanks for the welcome.
1. I would like to only have one element in the mark-up, as I will be changing the text hundreds of times throughout the course of the program. It would be easier to manage one element rather than continually showing and hiding different elements.
2. I actually didn't write that code at all, I just copied the link to the codepen from the link I referenced in my post, as the forum suggested including a codepen is advisable for context. Sorry if that was not clear, but I was only including that link as an example of what I'm trying to do (Minus toggling the visibility of multiple elements).
3. On my actual code, I'm currently handling it by having the text div visible, then changing the opacity. Then I use setTimeout to change the innerText and begin showing the element at the exact moment the opacity transition is complete. This works but makes it difficult to chain multiple animations that have to come one after another.
I will be making several similar animations though. For example I have a loading animation gif which plays, which I need to fade out and then fade in some text.
This is complicated and requires chaining promises since there's no way to know exactly when the program will finish loading, so I was hoping GSAP could make this simpler?