37595-vm/assets/js/main.js
2026-01-19 20:38:47 +00:00

14 lines
571 B
JavaScript

document.addEventListener('DOMContentLoaded', function () {
const togglePassword = document.querySelector('.toggle-password');
const passwordInput = document.getElementById('password');
if (togglePassword && passwordInput) {
togglePassword.addEventListener('click', function () {
const type = passwordInput.getAttribute('type') === 'password' ? 'text' : 'password';
passwordInput.setAttribute('type', type);
this.classList.toggle('bi-eye');
this.classList.toggle('bi-eye-slash');
});
}
});