How can I use jQuery to add text labels inside input fields and text fields and when a user clicks inside the input field the text disappears like here on stackoverflow.
Looking for examples or tutorials.
How can I use jQuery to add text labels inside input fields and text fields and when a user clicks inside the input field the text disappears like here on stackoverflow.
Looking for examples or tutorials.
$('#textboxid').focus(function() {
if(this.value == default_value) {
this.value = '';
}
});
$('#textboxid').blur(function() {
if(this.value == '') {
this.value = default_value;
}
});