3
I’m building a script for modals, but an unexpected error happened, the console says:
Uncaught Typeerror: loginBtn.addeventlistener is not a Function`", "at modaisGeral (index.html:233)" and "at index.html:235",
How can I correct?
function modaisGeral(){
var principalModal = document.querySelector("modais");//Recebe um elemento
var loginBtn = document.querySelectorAll(".login-modal-open");//Recebe um array de elementos
var loginModal = document.getElementById("login-modal");//Recebe o modal de login
loginBtn.addEventListener("click", function(){});
}modaisGeral();
Obg, thanks for the readiness :D
– Murilo Melo