-
-
Save olleman42/1411893 to your computer and use it in GitHub Desktop.
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
| $(function() { | |
| $("#menu-mainmenu li>ul").each(function() { | |
| var submeny = $(this); | |
| if (submeny.parent().hasClass("current-menu-item") == false) { | |
| submeny.hide(); | |
| } | |
| }); | |
| $("#menu-mainmenu li>ul>li").each(function() { | |
| var sublank = $(this); | |
| if (sublank.hasClass("current-menu-item") == true) { | |
| sublank.parent().show(); | |
| } | |
| }); | |
| $(".emptyNav > a").click(function() { | |
| var laenken = $(this); | |
| laenken.parent().parent().find("ul").hide(); | |
| laenken.parent().find("ul").show(); | |
| $("nav li").removeClass("current-menu-item current_page_item"); | |
| laenken.parent().addClass("current-menu-item current_page_item"); | |
| console.log("clicked klasser"); | |
| return false; | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment