Anonymous
2 значки глаз в пароле, и я хочу удалить другой [закрыто]
Сообщение
Anonymous » 26 май 2025, 11:04
Всегда есть две значки для глаз для переключения пароля, и я хочу удалить большой. Я хочу удалить первую икону глаз. HTML for password input, then JS is for the Password Visibility toggle and my CSS for the form.
Here is my code.
Код: Выделить всё
$("#togglePassword").click(function() {
var passwordInput = $("#password");
var icon = $(this).find("i");
if (passwordInput.attr("type") === "password") {
passwordInput.attr("type", "text");
icon.removeClass("fa-eye").addClass("fa-eye-slash");
} else {
passwordInput.attr("type", "password");
icon.removeClass("fa-eye-slash").addClass("fa-eye");
}
});< /code>
.form-control {
width: 100%;
padding: 0.8rem 1rem 0.8rem 2.8rem;
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 10px;
background: rgba(255, 255, 255, 0.8);
font-size: 1rem;
transition: var(--transition);
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}
.password-toggle {
position: absolute;
right: 15px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
color: #aaa;
transition: var(--transition);
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
}< /code>
Password
[i] control {{$errors->has('password')?'error':''}}" placeholder="Enter your password" />
[/i]
[i][/i]
{!!$errors->first('password', ':message')!!}[/b]
изображение выхода
>
Подробнее здесь:
https://stackoverflow.com/questions/796 ... -other-one
1748246679
Anonymous
Всегда есть две значки для глаз для переключения пароля, и я хочу удалить большой. Я хочу удалить первую икону глаз. HTML for password input, then JS is for the Password Visibility toggle and my CSS for the form.[b]Here is my code. [code]$("#togglePassword").click(function() { var passwordInput = $("#password"); var icon = $(this).find("i"); if (passwordInput.attr("type") === "password") { passwordInput.attr("type", "text"); icon.removeClass("fa-eye").addClass("fa-eye-slash"); } else { passwordInput.attr("type", "password"); icon.removeClass("fa-eye-slash").addClass("fa-eye"); } });< /code> .form-control { width: 100%; padding: 0.8rem 1rem 0.8rem 2.8rem; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 10px; background: rgba(255, 255, 255, 0.8); font-size: 1rem; transition: var(--transition); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05); } .password-toggle { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); cursor: pointer; color: #aaa; transition: var(--transition); z-index: 2; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; }< /code> Password [i] control {{$errors->has('password')?'error':''}}" placeholder="Enter your password" /> [/i] [i][/i] {!!$errors->first('password', ':message')!!}[/b] [/code] изображение выхода > Подробнее здесь: [url]https://stackoverflow.com/questions/79638364/2-eye-icons-in-password-and-i-want-to-remove-the-other-one[/url]