fbpx

Elementor: Close Your Custom Pop-up Menu on Link Click

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on email
Email
Elementor Custom Menu Popup

When you want to create a custom nav menu using Elementor, you will find out that there is no option to automatically close the popup when you click on a menu when the link is on the same page. Fortunately, there is a fast and efficient way of resolving this. Found this gem article from Element How.

  1. Insert an HTML Element on the popup you just created.
    custom html element
  2. Copy the following code.
<script>
jQuery(function($){
$(document).on('click','.elementor-location-popup a', function(event){
elementorProFrontend.modules.popup.closePopup( {}, event);
});
});
</script>

If done correctly, the link should close whenever you click a menu.

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on email
Email

Leave a Comment

Your email address will not be published. Required fields are marked *