Last active
February 14, 2024 10:59
-
-
Save JuliaKiselyova/44b59286d8767355d44c72b8e434b391 to your computer and use it in GitHub Desktop.
JavaScript code to add overlay functionality to mega menu items on a web page. When you hover over each menu item, an overlay is displayed behind it, providing a lightbox effect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .overlay { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| background: rgba(0, 0, 0, 0.7); | |
| display: none; | |
| z-index: -1; | |
| pointer-events: none; | |
| } | |
| .jet-mega-menu-item-has-children.jet-mega-menu-item--hover .overlay { | |
| display: block; | |
| z-index: 998; | |
| } | |
| .jet-mega-menu-item--hover .jet-mega-menu-mega-container { | |
| z-index: 999; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment