(This page includes affiliate links. If you click and purchase, I receive a small commission at no extra cost from you and that way you can support me. I only recommend tools that I have personally used and loved.)
Click to Reveal or Hover to Reveal with Elementor, CSS and Javascript JS
In this tutorial, we will replicate an apple page effect that I found. You can check the above video to see the effect. This design allows us to add more content behind each container. This leads to users on clicking on the content information that they have priority on.
Personal Website
Visit Portfolio
![](https://dmmotionarts.com/wp-content/uploads/2023/11/DMmotionarts-Landing-Page-Screenshot.jpg)
Recommended Web Creation Tools
Learn More
![](https://dmmotionarts.com/wp-content/uploads/2023/11/DMmotionarts-mayuresh-koli-recommended-tools.png)
Youtube Channel
@DMmotionarts
![](https://dmmotionarts.com/wp-content/uploads/2023/11/DMmotionarts-Youtube-Channel-Mayuresh-Koli.jpg)
Recommended Web Creation Tools
Learn More
![](https://dmmotionarts.com/wp-content/uploads/2023/11/DMmotionarts-mayuresh-koli-recommended-tools.png)
Personal Website
Visit Portfolio
![](https://dmmotionarts.com/wp-content/uploads/2023/11/DMmotionarts-Landing-Page-Screenshot.jpg)
Full Code for Show/Hide Content Effect – Elementor
- dm-click-container is the CSS class of the parent container. We have added the click event to capture on this container.
- dm-click-container-active is the CSS class that is dynamically added by our javascript. It only gets added on the clicked container.
- dm-click-front is the CSS class of the front content container. It is inside dm-click-container.
- dm-click-front-active is the CSS class that is dynamically added to the front container. In this code, we basically hide it by making opacity 0 so that it does not bleed through edge.
- dm-click-back is the CSS class of the back content container. It is inside dm-click-container. It is given opacity 0 by default as we don’t want it to be visible. The z-index is also lower than front container to place it at the back.
- dm-click-back-active is the CSS class that is dynamically added to the back container. In this code, we make it’s opacity to 1 and also increase it z-index to higher value so that it gets visible and content is selectable.
- You can change the EventListenter to ‘mouseover’ from ‘click’ at line 74, if you want it to be based on hover instead of click.