How To Close A Mobile Popup Menu in Elementor for a One-Page Site

If you’re making a one-page / landing page site and want to have the mobile popup menu close after clicking on a link, copy the following code:


<!-- Close Popup once anything within popup is clicked. -->
<script>
jQuery(function($){
$(document).on('click','.elementor-location-popup a', function(event){
elementorProFrontend.modules.popup.closePopup( {}, event);
});
});
</script>

Now, paste it into an HTML widget that you’ll put onto the bottom of the popup menu.

Other Helpful Articles

Smart Web Creative - Quick Resources: Date and Time in PHP

Quick Resources: Date and Time in PHP

If you want to display the date and time in PHP, it can be somewhat confusing what letters to use to bring in those elements. Below is a list of all the PHP date and time options that you can use on your site: To utilize these options in PHP,

Read More »
Smart Web Creative - How To Grab a URL Parameter for an Elementor Form in a Popup

Elementor: How To Grab a URL Parameter for an Elementor Form in a Popup

Trying to find out how to grab a URL parameter for an Elementor form in a popup? You can use the Javascript code below within an HTML widget that is on your Elementor popup: <script type="text/javascript"> jQuery(function($){ //When Clicking Input Fields $(document).on(‘click’,’input’, function(event){ //Grab Current URL var urlstr = window.location.href;

Read More »

How To Disable HTML in WordPress Comments

If you don’t want users to post HTML in comments on your site, you can post the code below into your WordPress theme’s functions.php file: /* Disable Hyperlinks in WordPress Comments */ remove_filter(‘comment_text’, ‘make_clickable’, 9); add_filter(‘pre_comment_content’, ‘strip_comment_links’); function strip_comment_links($content) { global $allowedtags; $tags = $allowedtags; unset($tags[’a’]); $content = addslashes(wp_kses(stripslashes($content), $tags));

Read More »

What Do You Need Done?:

(Please check all that apply)

Tell Us About You

Almost Done!

Let's Get Some Info

Let's Get Some Info

Let's Get Some Info

Let's Get Some Info

Let's Get Some Info

Let's Get Some Info