I am using
function example_append() {
$('#containment').append($('#example-textarea').val());
}
This is throwing the text I put in the form field in to the div #containment. I’d like to place the value of the form field into the containment div, but also have it wrapped in a div with a class name so I can style it. Is this possible?
Also, the user inserts the text via the form field and it gets thrown into that div, how could I remove that string of text if the user wants to start over?
These two functions should do what you’re looking for. Just bind
reset_textto a button or text on click.edit Added event bind for clearing text.