So, for instance facebook's search bar has faint word that says "search", but when you click on the bar, it becomes blank and you may begin typing, when you click away the "search" goes back.
Similarly, SO's ask a question title box has faint words that go away when you start typing.
I'm not too sure what this effect is called, but I'm wondering if theres a jQuery plugin that helps to achieve this. This isn't particularly difficult to program, but I thought why reinvent the wheel if someone already made a plugin for it.
I made a jQuery plugin that does just that!
I've since moved it to GitHub and rewrote it to address some issues. Enjoy! Feel free to email me where you use it, so I can feel useful :)
HTML5 has a feature called "placeholder" that achieves this. For example:
<input name="search" placeholder="Search" />
Of course, HTML5 isn't supported by all browsers, so javascript would do the trick elsewhere.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With