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.
 
 
 

220 lines
4.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
// button 1
document.getElementById("b_1").addEventListener("click", function menu() {
var x= document.getElementById("c_1");
let hemp = document.getElementById("hemp");
if (x.style.display === "none") {
x.style.display = "flex";
hemp.style.zIndex = "9";
}
else {
x.style.display ="none";
hemp.style.zIndex = "0";
}
}
);
// button 2
document.getElementById("b_2").addEventListener("click", function menu() {
var x= document.getElementById("c_2");
let permapp = document.getElementById("permapp");
if (x.style.display === "none") {
x.style.display = "flex";
permapp.style.zIndex = "9";
}
else {
x.style.display ="none";
permapp.style.zIndex = "0";
}
}
);
// button 3
document.getElementById("b_3").addEventListener("click", function menu() {
var x= document.getElementById("c_3");
let spider = document.getElementById("spider");
if (x.style.display === "none") {
x.style.display = "flex";
spider.style.zIndex = "9";
}
else {
x.style.display ="none";
spider.style.zIndex = "0";
}
}
);
// button 4
document.getElementById("b_4").addEventListener("click", function menu() {
var x= document.getElementById("c_4");
let cube = document.getElementById("cube");
if (x.style.display === "none") {
x.style.display = "flex";
cube.style.zIndex = "9";
}
else {
x.style.display ="none";
cube.style.zIndex = "0";
}
}
);
// button 5
document.getElementById("b_5").addEventListener("click", function menu() {
var x= document.getElementById("c_5");
let offgrid = document.getElementById("offgrid");
if (x.style.display === "none") {
x.style.display = "flex";
offgrid.style.zIndex = "9";
}
else {
x.style.display ="none";
offgrid.style.zIndex = "0";
}
}
);
// button 6
document.getElementById("b_6").addEventListener("click", function menu() {
var x= document.getElementById("c_6");
let cyber = document.getElementById("cyber");
if (x.style.display === "none") {
x.style.display = "flex";
cyber.style.zIndex = "9";
}
else {
x.style.display ="none";
cyber.style.zIndex = "0";
}
}
);
// button 7
document.getElementById("b_7").addEventListener("click", function menu() {
var x= document.getElementById("c_7");
let machina = document.getElementById("machina");
if (x.style.display === "none") {
x.style.display = "flex";
machina.style.zIndex = "9";
}
else {
x.style.display ="none";
machina.style.zIndex = "0";
}
}
);
// button
document.getElementById("b_8").addEventListener("click", function menu() {
var x= document.getElementById("c_8");
let miner = document.getElementById("miner");
if (x.style.display === "none") {
x.style.display = "flex";
miner.style.zIndex = "9";
}
else {
x.style.display ="none";
miner.style.zIndex = "0";
}
}
);
// 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";
}
}