JSFiddle - React, Tailwind, and code Playground
HTML
<div id="headertxtPassWord-Container" class="header-login-input-Container">
<input id="headertxtPassWord" value="password" class="header-login-input" />
</div>
JavaScript
$('.header-login-input').bind('click', function() {
if ($(this).val() === "password")
{
this.type = "password";
$(this).val('');
}
});
$('.header-login-input').bind('blur', function() {
if ($(this).val() === "")
{
this.type = "text";
$(this).val('password');
}
});