Browse Source

- dodanie w footer wywołania nasłuchiwania menu pokaz/ukryj (toogle)

dariusz.andryskowski 7 years ago
parent
commit
03a7b55a28
1 changed files with 14 additions and 0 deletions
  1. 14 0
      theme/view/footer.php

+ 14 - 0
theme/view/footer.php

@@ -19,3 +19,17 @@
 		</div>
 	</div>
 </footer>
+
+<script type="text/javascript">
+	// TOP MENU (hamburger)
+	if (document.getElementById("smad-page-home")) {
+		toggledisplay('smad-menu-main', 'none') 
+	}
+  // show/hide menu
+  function toggledisplay(elementID, style = 'none')  {
+      (function(style) {
+          style.display = (style.display === 'none' ? '' : 'none');
+      })(document.getElementById(elementID).style);
+  }
+
+</script>