With a little side of applesauce...

Monday, February 7, 2011

My First HTML 5 code

Nice! Instead of a javascript-y way of showing hints in a text box, use the 'placeholder' attribute:
<input name="phone_evening" type="text" placeholder="123-123-1234" id="phone_evening" tabindex="13" size="15" />


Use the cool ezpz-hint jQuery plug-in for browsers which don't support HTML 5 yet.

<script type="text/javascript"
<script type="text/javascript" charset="utf-8">

Then add this style to make the hint light-gray:
.ezpz-hint { color: #AAAAAA; } 

All of this, thanks to Joey Nelson!

No comments: