-
-
Save KaiserEMP/a8e13d5ec651f79bbf14355c186edd9d to your computer and use it in GitHub Desktop.
js
This file contains hidden or 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
| /* Toggle submenus */ | |
| $('.megamenu-container .expander').click(function(){ | |
| $(this).parent().toggleClass('current-menu-item'); | |
| }); | |
| /* Toggle desktop submenus */ | |
| $('.megamenu-container .sub-menu-container .expander').click(function(){ | |
| $(this).parent().toggleClass('current-menu-drop'); | |
| }); | |
| /* Current menu traverse */ | |
| $('.mega_columns .menu-item').each(function(){ | |
| if ($(this).hasClass('current-menu-item')) { | |
| //$('body').css("background-color", "yellow"); | |
| $(this).closest('.has_subitems').children('.menu-link').addClass('current-menu-item'); | |
| $(this).closest('.has_subitems').addClass('current-menu-drop'); | |
| //$(this).addClass('testing'); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment