I want to be able to do something like
<input type="text" name="txtField" value="" title="input your text" />
<textarea name="areaField" title="input your long text"></textarea>
And the title will auto fade out and back in as the field value, unlike the "search" here in stackoverflow (right on the top, it only fade out).
I could come up with a javascript and use onblur
and onfocus
, but that would be troublesome and I hope unnecessary. Preferably, I'd set just a single function for every INPUT and TEXTAREA within any given file, so all I need to do is set up its title
.
First question: what's the name for this?
Main question: Anyone have a good solution? What about with no jquery? Maybe there's a way to do it with CSS3 only, though I doubt it...