-
-
Save olleman42/1411893 to your computer and use it in GitHub Desktop.
Revisions
-
olleman42 revised this gist
Nov 30, 2011 . 1 changed file with 8 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,17 @@ $(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(); } }); @@ -18,7 +20,7 @@ $(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"); -
olleman42 revised this gist
Nov 30, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ $(function() { // LOL FORK $("#menu-mainmenu li>ul").each(function() { if ($(this).parent().hasClass("current-menu-item") == false) { $(this).hide(); -
There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ $(function() { $("#menu-mainmenu li>ul").each(function() { if ($(this).parent().hasClass("current-menu-item") == false) { $(this).hide(); } }); $("#menu-mainmenu li>ul>li").each(function() { if ($(this).hasClass("current-menu-item") == true) { $(this).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; }); });