![](https://ahc-koblenz.de/wp-content/uploads/2023/10/image-2.png)
#loginform i { margin-left: -30px; cursor: pointer;}
const togglePassword = document.querySelector("#togglePassword");
const password = document.querySelector("#user_pass");
togglePassword.addEventListener("click", function () {
// toggle the type attribute
const type = password.getAttribute("type") === "password" ? "text" : "password";
password.setAttribute("type", type);
// toggle the icon
this.classList.toggle("bi-eye");
});
Die Kommentarfunktion wurde deaktiviert