Unverified

Name

Elementor-Show-on-Click

About

Show another container when you click on an Icon.

Language

HTML

Rating

Voted: 0 by 0 user(s)

Codevault

WebSquadron

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.4

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

History

Last modified:

19/02/2024

Important Note

This snippet has the following status:

Unverified

This snippet has not been verified, use with caution and at your own risk. See details provided by author in sidebar and click below to find out more.

Elementor-Show-on-Click

 
                    
1<style>
2 #Cont222 {
3 transition: opacity 0.5s ease-in-out;
4 opacity: 0; /* Start with Cont222 invisible */
5 display: none; /* Ensure it doesn't take up space when not visible */
6 margin-top: -400px;
7 }
8</style>
9 
10<script>
11document.addEventListener("DOMContentLoaded", function() {
12 // Set initial CSS properties
13 document.getElementById('Cont222').style.display = 'none';
14 document.getElementById('Cont222').style.opacity = '0';
15 
16 // Function to show Cont222
17 document.getElementById('Icon111').addEventListener('click', function() {
18 var cont222 = document.getElementById('Cont222');
19 cont222.style.display = 'block';
20 setTimeout(function() { cont222.style.opacity = '1'; }, 10); // Allow time for display change
21 });
22 
23 // Function to hide Cont222
24 document.getElementById('Icon222').addEventListener('click', function() {
25 var cont222 = document.getElementById('Cont222');
26 cont222.style.opacity = '0';
27 setTimeout(function() { cont222.style.display = 'none'; }, 500); // Match transition time
28 });
29});
30</script>

0

Related Snippets

Please see some snippets below related to this snippet..

Elementor

Unverified

1

Elementor-Reveal-On-Click

Added: 4 months ago

Last Updated: 4 months ago

Show further info with click that replicates Apple IOS 17

Elementor

AI Verified

0

Reorder Columns in mobile view

Added: 1 year ago

Last Updated: 1 year ago

By using This snippet you can see new option in mobile view to reorder the column the way you need.

Elementor

Pro Verified

0

Default Panel Display

Added: 6 months ago

Last Updated: 6 months ago

By default, Elementor displays the widgets panel when the editor is loaded for the first time. You can change this.

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

Performance

AI Verified

31

Remove Unused Javascript

Added: 1 year ago

Last Updated: 1 month ago

Remove Unused Javascript - and improve your Page Speed Insight Score

WooCommerce

Pro Verified

10

Deactivate some WooCommerce Checkout Fields

Added: 1 year ago

Last Updated: 4 days ago

Deactivate some WooCommerce Checkout Fields from showing

Elementor

AI Verified

6

CSS Grid Aid

Added: 7 months ago

Last Updated: 1 month ago

This can be used for any WordPress Builder to aid working with CSS Grids.