Index: anwiki/_override-static/global/global/js/main.js |
=================================================================== |
--- a/anwiki/_override-static/global/global/js/main.js |
+++ b/anwiki/_override-static/global/global/js/main.js |
@@ -77,12 +77,15 @@ |
function initMenu() |
{ |
- var menu = document.getElementById("menu"); |
- var selectedItem = getSelectedItem(menu); |
- selectedItem.onclick = function() |
+ if ("querySelector" in document) |
Felix Dahlke
2012/12/21 12:57:12
Why not just:
if (document.querySelector)
|
{ |
- toggleClass(menu, "visible"); |
- }; |
+ var menu = document.querySelector("header nav>ul"); |
+ var selectedItem = getSelectedItem(menu); |
+ selectedItem.onclick = function() |
+ { |
+ toggleClass(menu, "visible"); |
+ }; |
+ } |
} |
function initFooterSection(section) |