Tags: watermark
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.
11/25/08 03:49:07 pm, 