fbpx

Close Custom Pop-up Menu on Link Click in Elementor

Facebook
Twitter
LinkedIn
Email
Elementor Custom Menu Popup

If you want to close custom pop-up menu on link click in Elementor, follow along the instructions below and you should be able to set it up like a pro. 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.

Facebook
Twitter
LinkedIn
Email

Leave a Comment

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