forms

Using JQuery to hide the value of text fields on focus

I created this little snippet (doesn't really warrant a plugin) to remove the default value from a text field when the field receives focus.  If for some reason the field loses focus the field will be refilled with the default value if you did not enter anything.

This is far from spectacular, I know but it's a handy snippet that only requires you to add the swaptextbox to any input field (type of text) to enable it to work.  You can have as many fields on a page that use this effect as you would like :)

Directions:

Syndicate Content

User login