I’ve spent hours and hours on this and it feels like it should be so much simpler, I must be missing something!
I have a normal Bricks nestable slider that has a few slides with background images and text.
For the main large text, I want to use the character stagger effect when the slide is visible.
This is what I’ve done to try and create this.
I made a Timeline with a Pageload trigger. The selector I’ve done two ways; one is to select the entire slide “.hero-slider” and the 2nd method was selecting the individual slides “.hero-slider__slide”. I’ve set “Handle triggers separately” as both on and off but it doesn’t seem to make a difference how this is arranged.
The animation is a “From” and targets the heading text “.slide__heading” and sets the stagger effect.
This works on page load for the first slide. Of course, no other slides have the effect, the text is just already visible and nothing animates.
Here is the json export of this timeline: Dropbox
Next I created a custom Event and used “On Slide Visible” for the event, and set the slide ID to target it.
When the event fires, I use GSAP Timeline and select my stagger timeline I created above. I’ve used both “Animate Trigger” and “Animate All” but I just can’t get it to work right.
What can happen is that when the slider moves, the text is already visible, then 100ms later or so, it disappears, then a longer 2 or 3 seconds and then finally the animation runs.
I have no delays on this anywhere, the timeline has no delay, the event has no delay and the action settings have no delay. Yet there is a delay before the slide text disappears and a very long delay before it animates.
The prevent FOUC setting doesn’t change anything.
The crazy part is that if I use my event and just do a different action like play a confetti, it runs perfect. The slide changes, the confetti pops. So why is it I can’t make my animation run again properly without delays and without showing the text first and so forth? Obviously the timeline may be set up wrong, like how it uses Pageload. But if I don’t use pageload, nothing happens on page load! If I just do custom trigger, it won’t run the first time.
I’m missing something because I don’t know why it should be this hard to simply run an animation when the slide changes.
Here is the json for the custom event. Dropbox
The two exports are just where I had the settings at the time I exported, but I’ve changed settings around 6 ways from Sunday.
What is the trick?