cannabinieri website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

186 lines
3.8 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. // show mobile menu onclick
  2. document.getElementById("icon").addEventListener("click", function menu() {
  3. var x = document.getElementById("md");
  4. if (x.style.display === "none") {
  5. x.style.display = "flex";}
  6. else {
  7. x.style.display ="none";
  8. }
  9. }
  10. )
  11. // show hemp submenu
  12. document.getElementById("chevron_1").addEventListener("click", function menu() {
  13. var x= document.getElementById("down_1");
  14. if (x.style.display === "none") {
  15. x.style.display = "flex";}
  16. else {
  17. x.style.display ="none";
  18. }
  19. }
  20. )
  21. // spider submenu
  22. document.getElementById("chevron_2").addEventListener("click", function menu() {
  23. var x= document.getElementById("down_2");
  24. if (x.style.display === "none") {
  25. x.style.display = "flex";}
  26. else {
  27. x.style.display ="none";
  28. }
  29. }
  30. )
  31. // offgrid submenu
  32. document.getElementById("chevron_3").addEventListener("click", function menu() {
  33. var x= document.getElementById("down_3");
  34. if (x.style.display === "none") {
  35. x.style.display = "flex";}
  36. else {
  37. x.style.display ="none";
  38. }
  39. }
  40. )
  41. // index
  42. // button 1
  43. document.getElementById("b_1").addEventListener("click", function menu() {
  44. var x= document.getElementById("c_1");
  45. if (x.style.display === "none") {
  46. x.style.display = "flex";}
  47. else {
  48. x.style.display ="none";
  49. }
  50. }
  51. );
  52. // button 2
  53. document.getElementById("b_2").addEventListener("click", function menu() {
  54. var x= document.getElementById("c_2");
  55. if (x.style.display === "none") {
  56. x.style.display = "flex";}
  57. else {
  58. x.style.display ="none";
  59. }
  60. }
  61. );
  62. // button 3
  63. document.getElementById("b_3").addEventListener("click", function menu() {
  64. var x= document.getElementById("c_3");
  65. if (x.style.display === "none") {
  66. x.style.display = "flex";}
  67. else {
  68. x.style.display ="none";
  69. }
  70. }
  71. );
  72. // button 4
  73. document.getElementById("b_4").addEventListener("click", function menu() {
  74. var x= document.getElementById("c_4");
  75. if (x.style.display === "none") {
  76. x.style.display = "flex";}
  77. else {
  78. x.style.display ="none";
  79. }
  80. }
  81. );
  82. // button 5
  83. document.getElementById("b_5").addEventListener("click", function menu() {
  84. var x= document.getElementById("c_5");
  85. if (x.style.display === "none") {
  86. x.style.display = "flex";}
  87. else {
  88. x.style.display ="none";
  89. }
  90. }
  91. );
  92. // button 6
  93. document.getElementById("b_6").addEventListener("click", function menu() {
  94. var x= document.getElementById("c_6");
  95. if (x.style.display === "none") {
  96. x.style.display = "flex";}
  97. else {
  98. x.style.display ="none";
  99. }
  100. }
  101. );
  102. // button 7
  103. document.getElementById("b_7").addEventListener("click", function menu() {
  104. var x= document.getElementById("c_7");
  105. if (x.style.display === "none") {
  106. x.style.display = "flex";}
  107. else {
  108. x.style.display ="none";
  109. }
  110. }
  111. );
  112. // button
  113. document.getElementById("b_8").addEventListener("click", function menu() {
  114. var x= document.getElementById("c_8");
  115. if (x.style.display === "none") {
  116. x.style.display = "flex";}
  117. else {
  118. x.style.display ="none";
  119. }
  120. }
  121. );
  122. // this function shows an element by id
  123. function show() {
  124. var x= document.getElementById("information");
  125. if (x.style.display === "none") {
  126. x.style.display = "flex"; }
  127. else {
  128. x.style.display ="none";
  129. }
  130. }
  131. //this function shows element2 by id -to be generalized
  132. function display() {
  133. var x= document.getElementById("footer-links");
  134. if (x.style.display === "none") {
  135. x.style.display = "flex";}
  136. else {
  137. x.style.display ="none";
  138. }
  139. }