JQuery <input> watermark that remains when focusing
I have several <input> in my form, and I would like to use them using fields. There are already many watermark plugins, but best of all, as I can say that they all clear the watermark when the <input> focuses, even if nothing is entered.
What I would like, ideally, is what will be displayed until the user types something in , is not focused or not.
Does anyone know of a plugin that does this already, or a sample code that can help me with this?
This plugin will retain the watermark when the input is focused, although it will be hidden when you press a key (even Ctrl).
I created a flexible plugin for this. it gets state: focused and full, and you can define your own CSS to control styles such as visibility, color and ... check out the samples and the full document for jQuery Placeholder here
As another alternative, if you like one of the other plugins better for other reasons, it would not be so difficult to change the script so that the watermark disappears on keyup rather than focus .