Skip to content

Instantly share code, notes, and snippets.

@elicus
Last active December 2, 2022 15:06
Show Gist options
  • Save elicus/e2ba7558f6972aef6fd931a1e46aec28 to your computer and use it in GitHub Desktop.
Save elicus/e2ba7558f6972aef6fd931a1e46aec28 to your computer and use it in GitHub Desktop.
<script>
(function($) {
function collapse_menu() {
var ParentMenuItem = $('.et_mobile_menu .parent-menu-item > a');
ParentMenuItem.off('click').click(function() {
$(this).attr('href', '#');
$(this).parent().children().children().toggleClass('show-menu-items');
$(this).toggleClass('switched-icon');
});
}
$(window).load(function() {
setTimeout(function() {
collapse_menu();
}, 700);
});
})(jQuery);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment