I have a multi page webpage that has a header and footer on all pages, and I am creating an app than can view certain areas of the page, but I dont want to show the footer and h
You can do it like this (don't forget to add your URL instead of 'Your URL'
in if
statement):
if(window.location.href == 'Your URL') {
document.getElementById('header').style.display = 'none';
document.getElementById('footer').style.display = 'none';
}
div {
margin: 10px;
width: 50px;
height: 50px;
background-color: green;
}
Cheers