Something for the weekend: Placeholder
Hoping to make this a fairly regular thing, I'll try and post little code bits and pieces every other weekend or so. Things like jQuery plugins, maybe some Kohana modules, maybe the odd CSS trick.
I've been pretty ill this weekend, but have fished out something from my personal stash you might like; a quick jQuery plugin that aims to replicate the HTML5 attribute "placeholder".
Dead simple to use, simply include the script, change your input[type=text]'s and textareas to include the placeholder="" attribute and then do :
[javascript]$('input[type=text], textarea').placeholder();[/javascript]
In your document ready function ($(function())).
Want it? Head on over to GitHub to download: