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.
 
 
 

108 lines
3.0 KiB

// 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";
}
}
function menu() {
var x= document.getElementById("mobile-dropdown");
if (x.style.display === "none") {
x.style.display = "block";}
else {
x.style.display ="none";
}
}
function menu2() {
var x= document.getElementById("down");
if (x.style.display === "none") {
x.style.display = "block";}
else {
x.style.display ="none";
}
}
function menu3() {
var x= document.getElementById("down1");
if (x.style.display === "none") {
x.style.display = "block";}
else {
x.style.display ="none";
}
}
function menu4() {
var x= document.getElementById("down2");
if (x.style.display === "none") {
x.style.display = "block";}
else {
x.style.display ="none";
}
}
function menu5() {
var x= document.getElementById("down3");
if (x.style.display === "none") {
x.style.display = "block";}
else {
x.style.display ="none";
}
}
function menu6() {
var x= document.getElementById("down4");
if (x.style.display === "none") {
x.style.display = "block";}
else {
x.style.display ="none";
}
}
//print pdf file
// const pdfBtn = document.getElementById('print');
// console.log(pdfBtn);
// const printPage = () => {
// window.print();
// }
// pdfBtn.addEventListener("click", (event) => {
// printPage(event, 'printed');
// });
// let screen = () => {
// console.log(window.innerHeight);
// console.log(window.innerWidth);
// };
// screen();
window.addEventListener('load', () => {
document.getElementById('print').addEventListener('click', () => {
let page = this.document.querySelector('.wrapper');
console.log(page);
console.log(window);
})
}, false);