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.

99 lines
1.9 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
  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. document.getElementById("click").addEventListener("click", () => {
  43. var x = document.getElementById("show");
  44. if (x.style.display === "none") {
  45. x.style.display = "flex";}
  46. else {
  47. x.style.display ="none";
  48. }
  49. }
  50. )
  51. // this function shows an element by id
  52. function show() {
  53. var x= document.getElementById("information");
  54. if (x.style.display === "none") {
  55. x.style.display = "flex"; }
  56. else {
  57. x.style.display ="none";
  58. }
  59. }
  60. //this function shows element2 by id -to be generalized
  61. function display() {
  62. var x= document.getElementById("footer-links");
  63. if (x.style.display === "none") {
  64. x.style.display = "flex";}
  65. else {
  66. x.style.display ="none";
  67. }
  68. }