// hide show password
if ( document.querySelectorAll('.toggle-password') ){
let hideshowpassbtns = document.querySelectorAll('.toggle-password');
hideshowpassbtns.forEach(item => {
item.addEventListener('click', e => {
let toggleId = item.getAttribute('toggle');
let input = document.querySelector(toggleId);
if( input.getAttribute("type") == "password" ){
input.setAttribute("type", "text");
item.classList.add('active');
}else{
input.setAttribute("type", "password");
item.classList.remove('active');
}
console.log(input);
})
});
}