Hi,
I have a textarea in the form, and I need to see what I type there in the separate div like on this site, when you post qestion or answer.
In the textarea I got text from new line when pressing enter, but in the div text stays in the same line. How can I go to new line there?
I'm using this:
<script type="text/javascript">
$('textarea#message').bind('keyup',function(){
enteredText = $('textarea').attr('value');
$('#changetext').text(enteredText);
});
</script>
<div id="changetext">
</div>
<div><form id="sendgreet" action="">
<dl>
<dt><label for="message">Text:</label></dt><dd><textarea cols="24" rows="6" id="message"></textarea></dd>
</dl>
</form>
</div>
P.S.: I actually do not need any html functionality there, just plain text with new line inserting.