Reply to comment

Why JS-dependent

I'm pretty sure you can do this without javascript with something along the lines of input { background-color: transparent; }
input:focus { background-color: white; }
and some tricky positioning/layering of the #example's html wrapping element. I'm not sure if IE6 or 7 support input:hover, or how easily the tricky positioning and layering would work scale to infinite unknown form text field sizes. But it would be great if this feature weren't JS dependent, at least for most users.

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options