Skip to content

Commit

Permalink
Bug_fix: Added changes in login_page.html for updating eyebutton feat…
Browse files Browse the repository at this point in the history
…ure (#1422)

Co-authored-by: Astha <astharana0123@gmail.com>
  • Loading branch information
Asthasingh-2002 and Astha authored Jul 11, 2023
1 parent c0edfd7 commit 77d2d61
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion Login_page/login_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 id="err"></h1>
<div class="form-group">
<i class="fa fa-unlock-alt"></i>
<input type="password" name="" id="password" placeholder="Password" />
<i class="fa fa-eye-slash icon" id="newPassword"></i>
<i class="fa fa-eye-slash icon" id="newPassword" ></i>
</div>
</div>
<div class="button">
Expand Down Expand Up @@ -132,6 +132,23 @@ <h1 id="err"></h1>
}

</script>
<script>
const togglePassword = document.querySelector('#newPassword');
const password = document.querySelector('#password');

togglePassword.addEventListener('click', function (e) {
if (password.type === "password") {
password.type = "text";
document.getElementById('newPassword').classList.remove('fa-eye-slash');
document.getElementById('newPassword').classList.add('fa-eye');
} else {
password.type = "password";
document.getElementById('newPassword').classList.remove('fa-eye');
document.getElementById('newPassword').classList.add('fa-eye-slash');
}

});
</script>


<!--<script src = "login.js"></script>-->
Expand Down

0 comments on commit 77d2d61

Please sign in to comment.