I posted a working version here: http://jsfiddle.net/JV2qW/2/
I have a text box that updates (on keyup() ) a div with the text that is being entered. Everything works as it should, except that line breaks are not recognized.
html:
<p>enter text</p> <textarea id='text'></textarea> <div id='target'></div>
and jquery:
$('#text').keyup(function(){ var keyed = $(this).val(); $("#target").html(keyed); });
Any thoughts on how to pass \n to <br/> or <p> tags?
thank you very much.
source share