diff --git a/resources/js/app.js b/resources/js/app.js index 814fd37..a486220 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -120,3 +120,12 @@ document.addEventListener('DOMContentLoaded', function () { }) +// Ver contraseña, con JQuery +$(document).on('click', '#togglePassword', function () { + const input = $('#passwordInput'); + const isPassword = input.attr('type') === 'password'; + + input.attr('type', isPassword ? 'text' : 'password'); + $('#iconShow').toggleClass('hidden', isPassword); + $('#iconHide').toggleClass('hidden', !isPassword); +}); \ No newline at end of file diff --git a/resources/views/login.blade.php b/resources/views/login.blade.php index 9e0bc6b..e6a7bf3 100644 --- a/resources/views/login.blade.php +++ b/resources/views/login.blade.php @@ -2,43 +2,86 @@