Skip to content

Instantly share code, notes, and snippets.

@elicus
Created May 24, 2021 16:22
Show Gist options
  • Save elicus/c919202a5fa89b0ef17c3efcf420c06b to your computer and use it in GitHub Desktop.
Save elicus/c919202a5fa89b0ef17c3efcf420c06b to your computer and use it in GitHub Desktop.
<script>
(function($){
$('body').on('click', '.dfh-27-hamburger-icon', function(){
$(".dfh-27-menu-row").toggleClass("dfh-27-menu");
});
$('body').on('click', '.dfh-27-close-icon', function(){
$(".dfh-27-menu-row").toggleClass("dfh-27-menu");
});
if($(window).width() < 981){
$('body').on('click touchstart', '.et-menu .menu-item-has-children > a', function() {
$(this).attr('href', '#/');
$(this).parent().children(".sub-menu").toggleClass('dfh-show-menu-items');
});
}
})(jQuery);
jQuery(window).load(function(){
jQuery('.dfh-27 a[href*="#"]:not([href="#"])').on('click', function(){
jQuery(".dfh-27-menu-row").toggleClass("dfh-27-menu");
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment