Showing the password contents for 10-15 secs

On clicking the "show", the contents of the password will be vibile for 10-15 secs

by Hema Nandagopal

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<body>
<input type="password" id="confirmPassword"  class="dropbtn">
<p style="font-weight: 900;font-size: 25px;" id="showConfirmPassword">Show</p>

JavaScript

$("#showConfirmPassword").click(function(){
$('#confirmPassword').attr('type', 'text'); 
setTimeout(function(){$('#confirmPassword').attr('type', 'password'); }, 500);
});
$('#confirmPassword').attr('type', 'password');