Posted 20 Apr 2012 Link to this post
Posted 02 May 2012 Link to this post
<
input
type
=
"text"
id
"firstName"
class
"watermark"
/>
.watermark
{
color
:
#D3D3D3
;
}
.unwatermark
: Black;
$(
'#firstName'
).text(
'First Name'
);
).val(
$(document).delegate(
".watermark"
,
"focus"
function
(e) {
if
($(
this
).val() == $(
)){
''
var
cssClass = $(
).attr(
'class'
, cssClass.replace(
"unwatermark"
));
});
".unwatermark"
"blur"
e.preventDefault();
).val() ==
) {
).val($(
).text());
Posted 03 May 2012 Link to this post
value
""
placeholder
"First Name"
autocomplete
"off"
>