Skip to content

Instantly share code, notes, and snippets.

@lots0logs
Last active February 22, 2017 08:58
Show Gist options
  • Save lots0logs/dd862ac6d18a249bfc49 to your computer and use it in GitHub Desktop.
Save lots0logs/dd862ac6d18a249bfc49 to your computer and use it in GitHub Desktop.
WordPress :: Divi Theme :: Slide-Out Navigation :: Close menu when any link is clicked.
<script>
(function($) {
$(window).load(function() {
setTimeout(function() {
$('.et_pb_fullscreen_nav_container a').each(function() {
$(this).click(function() {
setTimeout(function() {
$('.et_toggle_slide_menu').trigger('click');
}, 700);
});
});
}, 1500);
});
})(jQuery);
</script>
@Lea31
Copy link

Lea31 commented Oct 13, 2016

Hi ! I'm working on divi and I created a fullscreen menu in a single one page, with anchors links.
I tried your code but it doesn't work, the menu doesn't close after clicking....
I put the code into the balises, is that the right place ?
Thank you for your reply

@JHethDev
Copy link

Thanks for the great snippet! Anyone confused with the placement, it is in the title of the .html file

epanel > integration > body section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment