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

AI Verified

0

Custom Class for Elementor Form Widget Items

Added: 5 months ago

Last Updated: 5 months ago

Add custom classess to form elements using elementor; Note: if you want to add to other field types like select, then just add this to the allowed fields array: $allowed_fields just add the type, lik...

Elementor

AI Verified

1

PHP: Remove image sizes (controls) from Elementor image dropdowns

Added: 10 months ago

Last Updated: 10 months ago

<p>Since we disable the generation of images besides the original upload, the Elementor controls aren't relevant. This doesn't disable controls on all widgets, unfortunately — but it does remove them...

Elementor

AI Verified

0

Current Year Shortcode

Added: 6 months ago

Last Updated: 6 months ago

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

Performance

AI Verified

32

Remove Unused Javascript

Added: 1 year ago

Last Updated: 3 days 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: 2 weeks ago

Deactivate some WooCommerce Checkout Fields from showing

Elementor

AI Verified

6

CSS Grid Aid

Added: 8 months ago

Last Updated: 1 month ago

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