Closing the "Overlay" feature by clicking anywhere
-
wrote on Sep 3, 2024, 1:04 PM last edited by
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.
-
-
wrote on Sep 3, 2024, 7:44 PM last edited by
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 -
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
-
wrote on Sep 11, 2024, 2:35 PM last edited by
Thank you Armin! :) Works perfect! Love it!
I also code custom websites or custom Lay features.
💿 Email me here: 💿
info@laytheme.com
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
Online Users
Forgot your key, lost your files, need a previous Lay Theme or Addon version?
Go to www.laykeymanager.com