I’ve checked some similar threads, but either they were unclear or too advanced for as I’m still couple of days learning jQuery.
I have a text area:
<textarea class='text' rows='10' cols='25'></textarea>
And I want that after the user has entered some text they would press the Add text button
<button type='button' class='addText'>Add text</button>
and so, the text they’ve entered would show up in the table <tr></tr>.
I Googled that you can do that with jQuery append function, but didn’t really get the solution to my problem.
So, is there a way to do something like this?
$('.addText').click(function(){
$('.smth').append( TEXT in TEXTAREA to TR );
});
P.S.
.smth is the row class = <tr class='smth'></tr>
In order to get a
textarea‘s value, you could use$("#idOfTextArea").val(), e.g.