JSFiddle - React, Tailwind, and code Playground
by schlomm
JavaScript
function getMap() {
var x = document.getElementById("flex_nav");
var y = x.getElementsByTagName("LI");
var i;
for (i = 0; i < y.length; i++) {
y[i].classList.remove("active");
};
document.querySelector('footer').style = 'display: none'
var footerCopyright = document.getElementsByClassName("footer-copyright");
footerCopyright[0].style.display = 'none';
var headerMain = document.getElementsByClassName("header-main");
var navMain = document.getElementsByClassName("nav-main");
var flex = document.getElementById("flex_nav");
if (flex.classList.contains("flexnav-show")) {
flex.classList.remove("flexnav-show");
//alert(flex.className);// Has my-class in it
} else {
// No my-class :(
};
var height = window.innerHeight - headerMain[0].clientHeight - navMain[0].clientHeight;
var ndRegion = document.getElementsByClassName("nd-region");
var ndContainer = document.getElementById("Content");
ndRegion[0].style.height = "500px";
ndContainer.style.display = 'none';
if (document.getElementById("spacer")) {
var ndSpacer = document.getElementById("spacer");
ndSpacer.style.height = "300px";
};
//var ndRegion = document.getElementsByClassName("nd-region");
//ndRegion[0].style.display = 'none';
var mapViewerDiv = document.getElementById("mapViewerDiv")
if (!mapViewerDiv) {
var mapViewerDiv = document.createElement("div");
mapViewerDiv.setAttribute("id", "mapViewerDiv");
var mapViewer = document.createElement("iframe");
mapViewer.setAttribute("id", "mapViewer");
mapViewer.style.tabindex = '1';
mapViewer.style.position = 'absolute';
//mapViewer.setAttribute("src", "https://www.geoportal.nrw/mapapps-a-4.1.0-geoportal.html?lang=de");
mapViewer.setAttribute("src", "https://www.geoportal.nrw/mapapps-a-standalone-3.9.2-geoportal.html?lang=de");
mapViewer.style.width = '100%';
...