The HTML5 placeholder attribute isn’t supported in all browsers, and can create some whackiness when styling an element that uses it. Here’s little snippet to emulate the HTML5 placeholder attribute. It doesn’t do anything if placeholder is natively supported. 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).

This version doesn’t support coloring the placeholder text.

There’s a “gotcha” – if retrieving the value of the element later (either directly, or using val() or a form serializer, or a simple form submission), you’ll get back the placeholder value. You could override the val() method for invoking elements, but still it’d be accessible directly (element.value or element.getAttribute, etc). I’d suggest just testing the value against the placeholder during the fetch/submission/serialization operation.