I want a textarea with some default text. When the user clicks in the textarea the default text should be deleted. How can I make value of a textarea disappear on click?
<
And if someone wants to do this trick on a ajax loaded textareas you can achieve this with the .live()
event ;)
$('#textarea').live('focusin',function () {
if (this.value === 'leDefault ...') {
this.value = '';
}
});
$('.larger').live('focusout',function () {
if (this.value === '') {
this.value = 'leDefault';
}
});