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.
 
 
 

100 lines
1.9 KiB

// show mobile menu onclick
document.getElementById("icon").addEventListener("click", function menu() {
var x = document.getElementById("md");
if (x.style.display === "none") {
x.style.display = "flex";}
else {
x.style.display ="none";
}
}
)
// show hemp submenu
document.getElementById("chevron_1").addEventListener("click", function menu() {
var x= document.getElementById("down_1");
if (x.style.display === "none") {
x.style.display = "flex";}
else {
x.style.display ="none";
}
}
)
// spider submenu
document.getElementById("chevron_2").addEventListener("click", function menu() {
var x= document.getElementById("down_2");
if (x.style.display === "none") {
x.style.display = "flex";}
else {
x.style.display ="none";
}
}
)
// offgrid submenu
document.getElementById("chevron_3").addEventListener("click", function menu() {
var x= document.getElementById("down_3");
if (x.style.display === "none") {
x.style.display = "flex";}
else {
x.style.display ="none";
}
}
)
// index
document.getElementById("click").addEventListener("click", () => {
var x = document.getElementById("show");
if (x.style.display === "none") {
x.style.display = "flex";}
else {
x.style.display ="none";
}
}
)
// this function shows an element by id
function show() {
var x= document.getElementById("information");
if (x.style.display === "none") {
x.style.display = "flex"; }
else {
x.style.display ="none";
}
}
//this function shows element2 by id -to be generalized
function display() {
var x= document.getElementById("footer-links");
if (x.style.display === "none") {
x.style.display = "flex";}
else {
x.style.display ="none";
}
}