jQuery emptyonclick Plugin - form field watermarks

by Jack K

The jQuery emptyonclick plugin solves a common problem nicely, creating "watermark" text inside a form field.

http://www.madewithlove.be/blog/the-jquery-emptyonclick-plugin/

I've actually tried a few plugins for this kind of effect and most solutions have some kind of problem with them. There are a few subtleties to solving the problem nicely. I ran some tests on this one and didn't find any gotcha's or special requirements that would make it seem annoying to use.

Worth remembering. Solves a seemingly simple problem in a simple seeming way.

A note: if the form that the field you're watermarking has reset or submit buttons, an event handler gets bound to them that will clear the value in your watermarked fields if it's the same value as the default for the field. That will probably be useful and probably won't get in your way, but it's something to be aware of.



5 comments

You mentioned some interesting points, I was actually referred here by a friend of mine. Defaintely good info. http://www.rapidskunk.com/Moby---Early-underground.-(1993).html
04/27/10 @ 00:31
Awesome post, you have alot of knowledge on the topic, http://www.rapidsloth.com/Fable-2-(XBOX360).html review similar ideas and tell their opinions.
04/29/10 @ 07:04
I tend to agree with alot of the points you made. Some of the same ideas i foudn here http://www.rapidsnake.com/Wallpapers-Travel-Africa.html keep up the good updates.
06/02/10 @ 07:59
I really liked the theme of this blog.
06/17/10 @ 11:09
Comment from: Roadtourscr [Visitor] · http://www.roadtourscr.com
wow.. great article buddy, thanks for sharing :) keep posting !!!
07/06/10 @ 15:02

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)