How to empty the message in a text area with jquery?
$('#message').html('');
You can use this method too. Because everything between the open and close tag of textarea is html code.
$('#message').val('');
Explanation (from @BalusC):
textarea
is an input
element with a value. You actually want to "empty" the value. So as for every other input
element (input
, select
, textarea
) you need to use element.val('');
.
Also see docs