$(document).ready(function(){
$('#dayOfBirth').bind('focus',function(){
$(this).val('');
});
});
- Original Message -
From: "Raghu" <[EMAIL PROTECTED]>
To: "jQuery (English)"
Sent: Sat
$('#dayOfBirth').bind('focus',function(){
$(this).val('');
});
- Original Message -
From: "Raghu" <[EMAIL PROTECTED]>
To: "jQuery (English)"
Sent: Saturday, April 05, 2008 12:55 AM
Subject: [jQuery] JQuery bigginer
>
> Hi I am learning JQuery and Javascript so askin
You want what is often called a PlaceHolder. Nice coverage of it in
the "Learning jQuery" book by Chaffer and Swedberg. Basically you
want to set a focus handler that notices if the value is your
placeholder text (eg "Day") and sets the text value to "" in that
case. It's nice if your blur handl
Something like this might workd (untested):
// when the text field changes
$('#myTextField').change(function(){
// if it's empty
if ($(this).val() == '') {
// give it focus
$(this).focus();
}
};
-Original Message-
From: jquery-en
4 matches
Mail list logo