[jQuery] Switching input type

[jQuery] Switching input type


Hi guys,
I have a form input that displays "Enter a password" (value="enter a
password"), which when in focus I would like to convert to a password
field.
I'm looking for something like this:
<input type="text" value="enter a password" onFocus="hidePass()" />
to
<input type="password" />
I've tried following the API, but I still get "uncaught exception:
type property can't be changed" error in Firebug.
Any help would be much appreciated.
- Samuel.