Browse Source

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

dariusz.andryskowski 7 năm trước cách đây
mục cha
commit
03a7b55a28
1 tập tin đã thay đổi với 14 bổ sung0 xóa
  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>