I have a problem with classList
.
I tried to Open/Close with one button, like a Element.classList.toggle("name_css");
I have problems with that in IE 11/Edge.
Other browsers are OK.
var buttonOpen = document.querySelector(".travel__btn");
var ModalWindow = document.querySelector("form");
ModalWindow.classList.add("info__modal-hide");
buttonOpen.addEventListener("click", function(evt) {
evt.preventDefault();
ModalWindow.classList.toggle("info__modal");
Login.focus();
if (storage) {
In.value = storage;
Out.focus();
} else {
In.focus();
}
});
.travel__info {
padding: 55 px;
height: 285 px;
width: 458 px;
background - color: white;
display: block;
}
.info__modal - hide {
display: none;
}
.info__modal {
display: block;
animation: bounce 0.6 s;
}