Insert text into textarea with jQuery
formatting, jquery, textarea
Solution
From what you have in Jason's comments try:
$('a').click(function() //this will apply to all anchor tags
{
$('#area').val('foobar'); //this puts the textarea for the id labeled 'area'
})
Edit- To append to text look at below
$('a').click(function() //this will apply to all anchor tags
{
$('#area').val($('#area').val()+'foobar');
})
Problem
I'm wondering how I can insert text into a text area using jquery, upon the click of an anchor tag. I don't want to replace text already in textarea, I want to append new text to textarea.