Closing the "Overlay" feature by clicking anywhere
-
Hi Guys!
Is there any solution to close the “Overlay” feature by clicking anywhere? Currently there is only an option to close by clicking on the close button.
-
-
Hi Armin,
It works, but not in my case :) I don't know how I could apply this along with centering the menu...
Check this (overlay is a menu):
https://mintcream-pigeon-114810.hostingersite.com -
arminunruh Global Moderatorwrote on Sep 6, 2024, 12:59 PM last edited by arminunruh Sep 6, 2024, 9:05 AM
-
<script> jQuery(document).on('click', '#lay-overlays .lay-content', function(e){ jQuery(e.target.closest('.lay-overlay')).find('.overlay-close').click(); }) </script>
this closes the overlay whenever you click on anything inside the overlay
put it in lay options → custom css & html → custom <head> contentthis only works if you have the X close icon activated for your overlay
-
Thank you Armin! :) Works perfect! Love it!
Sep 3, 2024, 1:04 PM
6/6
Sep 11, 2024, 2:35 PM
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it
Forgot your key, lost your files, need a previous Lay Theme or Addon version?
Go to www.laykeymanager.com