Swap Image Modules at the Click of a Button

|

If you want to swap between two Divi image modules at the click of a button, here's a way to achieve it with the Divi Show / Hide Button module. 

First, create a column with two image modules (one for each image) and then a show / hide button below them, like so:
Use one image module for each of the two images and set each to open in a light box. Give each a CSS ID, e.g. "image1" and "image2"

Configure the show / hide button to hide image2 initially:

And to toggle the two image modules on click:
You might also want to set the transition duration to "0" so that there is no animation during the change. You can do that with this option:

https://divibooster.com/adjusting-the-show-hide-button-transition-duration/

This post may contain referral links which may earn a commission for this site

Divi Booster

Hundreds of new features for Divi
in one easy-to-use plugin

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 *.