$("#password-show-button").mouseup(function () { $("#password").attr("type", "password"); }); $("#password-show-button").mousedown(function () { $("#password").attr("type", "text"); });
How to View Toggle Password On and Off using jQuery
304
2 years ago
0 comments
To toggle the view password field on and off you can simply make use of jQuery "mouseup" and "musedown" event. The way to view the password value is simply by changing the input field type from "password" to "text". Do check the code implementation below for the full code example.
Topics:
Frontend
Resource
Average
Average
Support Us
If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️
Leave a reply