I would like to add visability to password input element

Here is the code, but it is doesn’t work. Can anybody help me with that?

$w.onReady( function () {
$w( “#showPassword” ).show()
})

export function showPassword_click(event) {
$w( “#input” ).inputType = “Password” ;
$w( “#showPassword” ).show()
$w( “#showPassword” ).hide()
}

export function hidePassword_click(event) {
$w( “#input” ).inputType = “Password” ;
$w( “#showPassword” ).hide()
$w( “#showPassword” ).show()
}