Below Jquery is working fine but How could I shorten this Jquery? I have to show and hide the password for password and confirmed password? https://jsfiddle.net/c5cvLo54/1/
<script> $(document).ready(function(){ $('#btn').click(function(){ var paswd= $('#password'); if(paswd.attr("type")== "password"){ paswd.attr("type","text"); $('#btn').attr("value","hide"); } else{ paswd.attr("type","password"); $('#btn').attr("value","show"); } }) }); </script>