Set a correct behaviour using the placeholder

Sometimes we want to have a dynamic width even when the input is smaller than the placeholder.
To do that, we may drop the width css attribute.

Here is an example. Please input some text, then erase it.
http://jsfiddle.net/mJMpw/695/

The trick is to use the placeholder text as a default if there is no value in the input.