Last active
October 14, 2021 12:32
-
-
Save elicus/b078f8ca931340f45cd15f99a72440d1 to your computer and use it in GitHub Desktop.
How To Build Divi Hamburger Menu on Desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function($){ | |
$('body').on('click', '.de-menu-ham-icon', function(){ | |
$(".de-menu-row").toggleClass("de-menu-active"); | |
}); | |
$('body').on('click', '.de-menu-close-icon', function(){ | |
$(".de-menu-row").toggleClass("de-menu-active"); | |
}); | |
$('body').on('click touchstart', '.et-menu .menu-item-has-children > a', function() { | |
$(this).attr('href', '#/'); | |
$(this).parent().children().children().toggleClass('de-show-menu-items'); | |
$(this).toggleClass('de-menu-switched-icon'); | |
}); | |
jQuery(window).load(function(){ | |
jQuery('.de-menu a[href*="#"]:not([href="#"])').on('click', function(){ | |
jQuery(".de-menu-row").toggleClass("de-menu-active"); | |
}); | |
}); | |
})(jQuery); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment