Show and Hide password

Show and Hide password

Hi,

Please have a look here:


The jQuery part changes the type of the input from password to text to show and hide the password.
It works great.

But I want to achieve that by clicking on "Show" it's text changes to "Hide" and by clicking on "Hide" it changes to "Show".

 How can I change the code to achieve this?

Thanks