how to do new lines? [ textarea -> jquery -> p tag ]
- by Haroldo
I'm doing something very similar to the stackoverflow question preview only much more basic.
user types in text area - keyup shows what they've typed in preview
new lines aren't working
$('input, textarea').keyup(function(){
var value = $this.attr('value').replace('\n', '<br />').replace('\r', '<br />');
$('p.preview').html(value);
})