Skip to content

Commit

Permalink
dash eye icon added
Browse files Browse the repository at this point in the history
  • Loading branch information
PATILYASHH committed Nov 6, 2024
1 parent 0186072 commit f56fdd5
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h2 class="title">Sign in</h2>
<i class="fas fa-lock"></i>
<input type="password" placeholder="Password" id="sign-in-password" />
<i class="fas fa-eye password-toggle" onclick="togglePassword('sign-in-password', this)"></i>
</div>
</div>
<div class="login">
<input type="submit" value="Login" class="btn solid" />
</div>
Expand Down Expand Up @@ -283,6 +283,20 @@ <h3>One of us ?</h3>

animateCircles();
</script>

<!-- Dash eye icon script -->
<script>
function togglePassword(id, element) {
const passwordInput = document.getElementById(id);
if (passwordInput.type === 'password') {
passwordInput.type = 'text';
element.classList.remove('fa-eye');
element.classList.add('fa-eye-slash');
} else {
passwordInput.type = 'password';
element.classList.remove('fa-eye-slash');
element.classList.add('fa-eye');
}
}
</script>
</body>
</html>

0 comments on commit f56fdd5

Please sign in to comment.