var modal = document.querySelector(".modal-dealer-link-x-users");
var trigger = document.querySelector("#trigger-dealer-link-x-users");
var closeButton = document.querySelector(".close-div-dealer-link-x-users");
function toggleModal() {
modal.classList.toggle("show-modal-dealer-link-x-users");
}
function windowOnClick(event) {
if (
event.target === modal) {
toggleModal();
}
}
trigger.addEventListener("click", toggleModal);
closeButton.addEventListener("click", toggleModal);
window.addEventListener("click", windowOnClick);