Apply the Divi Slider Animation to all Slides

|

Most Divi modules include animation options which let you control the animation applied to the module when the page is first loaded (fade in, slide in, etc). It might seem like this option should set the animation on all slides in the Divi Slider module. However, that's not the case – even on the slider module it just applies to the slider as a whole, not individual slides. Nonetheless, there is a way to, sort of, apply the animation setting to individual slides, which I'll explore here.

To apply animation to each Divi slide individually:

  1. Enable "Automatic Animation" in Slider Settings > Design > Animation for continuous sliding
  2. Set "Animation Repeat" to "Loop" with the same duration as the automatic animation
  3. Adjust "Animation Delay" if needed to sync animation with slide transitions

Note that I don't necessarily recommend this technique – there are other techniques (such as this one from WP Zone) that may produce a better result. But the technique demonstrated in this post is simpler and the result may be acceptable for some situations.

Overview

The idea is simply to set the slide to automatically transition between slides with a delay, and set the module animation to run on "loop" with the same duration. In theory, this means that each time the slider transitions to the next slide, the animation will re-run, making it appear as though it is the slide itself that is being animated.

Set the slider to automatically transition

To set this up:

First, enable the slider to continuously transition between slides at:

Slider Settings > Design > Animation

Like so: 

Here I've enabled "Automatic Animation" to ensure the slider transitions from one slide to the next automatically, and have set it to do this once every 4 seconds (4000ms). I've also set it to continue to slide on hover, so that the user won't affect the regular transition of the slides if they hover over the slider.

Set the animation to loop

Next, set the animation to loop with the same duration as the slider transitions, e.g. 

Here, I've set the "Animation Repeat" to "Loop", so that the animation I've selected ("Zoom" in this example), will run repeatedly, and I've set "Animation Duration" to the same 4 secs (4000ms) as the slide transition, so that for every slide transition the animation will run once. Finally, the "Animation Delay" can be used to tweak when the animation starts to solve the case that the slide transition and slider animation are slightly out of sync. 

 

Okay, here's an example: 

Your Title Goes Here

Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.

Your Title Goes Here

Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.

Your Title Goes Here

Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.

Notes on the technique

The first thing to note is that the slider module immediately hides one slide when it transitions to the next. When using the animation settings technique, this means that one slide will disappear before the other animates in (rather then the new slide animating into place on top of the previous slide). It might be possible to do something about that, but I haven't looked into it yet. One way to soften the impact may be to set a common background on the row and transparent backgrounds on the slider / slides, so that only the text disappears / animates in. 

Second, while it seems to work reasonably well, note that the animation and slide transition aren't really synced up and could drift out of sync, or start out of sync depending on various factors.  

0 Comments

Submit a Comment

Comments are manually moderated and approved at the time they are answered. A preview is shown while pending but may disappear if your are cookies cleared - don't worry though, the comment is still in the queue.

Your email address will not be published. Required fields are marked *.

We may earn a commission when you visit links on our website.