while generally I prefer to emulate the HTML5 placeholder attribute, sometimes we want to recreate the behavior but use the original value of the element rather than an attribute. here’s a little plugin that does it (note that the plugin requires an explicit invocation, and is not automatically assigned to all elements (so must be called by dynamically created elements even if run against all inputs, for example, on domready).


at some point i should test for defaultValue support – if not available, I’d just use val() on the first level of the loop and save it in a variable.