show-password.min.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. (function() {
  2. "use strict";
  3. $("#Password-toggle a").on('click', function(event) {
  4. event.preventDefault();
  5. if ($('#Password-toggle input').attr("type") == "text") {
  6. $('#Password-toggle input').attr('type', 'password');
  7. $('#Password-toggle i').addClass("zmdi-eye");
  8. $('#Password-toggle i').removeClass("zmdi-eye-off");
  9. } else if ($('#Password-toggle input').attr("type") == "password") {
  10. $('#Password-toggle input').attr('type', 'text');
  11. $('#Password-toggle i').removeClass("zmdi-eye");
  12. $('#Password-toggle i').addClass("zmdi-eye-off");
  13. }
  14. });
  15. $("#Password-toggle1 a").on('click', function(event) {
  16. event.preventDefault();
  17. if ($('#Password-toggle1 input').attr("type") == "text") {
  18. $('#Password-toggle1 input').attr('type', 'password');
  19. $('#Password-toggle1 i').addClass("zmdi-eye");
  20. $('#Password-toggle1 i').removeClass("zmdi-eye-off");
  21. } else if ($('#Password-toggle1 input').attr("type") == "password") {
  22. $('#Password-toggle1 input').attr('type', 'text');
  23. $('#Password-toggle1 i').removeClass("zmdi-eye");
  24. $('#Password-toggle1 i').addClass("zmdi-eye-off");
  25. }
  26. });
  27. $("#Password-toggle2 a").on('click', function(event) {
  28. event.preventDefault();
  29. if ($('#Password-toggle2 input').attr("type") == "text") {
  30. $('#Password-toggle2 input').attr('type', 'password');
  31. $('#Password-toggle2 i').addClass("zmdi-eye");
  32. $('#Password-toggle2 i').removeClass("zmdi-eye-off");
  33. } else if ($('#Password-toggle2 input').attr("type") == "password") {
  34. $('#Password-toggle2 input').attr('type', 'text');
  35. $('#Password-toggle2 i').removeClass("zmdi-eye");
  36. $('#Password-toggle2 i').addClass("zmdi-eye-off");
  37. }
  38. });
  39. })();