<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
?>
<div class="user_showhidepassword">
  <i id="newtogglePassword"  style="display:none;"></i>
</div>
<script>
  var newtogglePassword = document.querySelector('#newtogglePassword');
  if(document.getElementById('password')) {
    var passnew = document.querySelector('#password');
  }
  
  newtogglePassword.addEventListener('click', function (e) {
      // toggle the type attribute
      var type = passnew.getAttribute('type') === 'password' ? 'text' : 'password';
      passnew.setAttribute('type', type);
      // toggle the eye / eye slash icon
      this.classList.toggle('showpassword');
  });
</script>
