how to do new lines? [ textarea -> jquery -> p tag ]
<p>I'm doing something very similar to the stackoverflow question preview only much more basic.</p>

<p>user types in text area -> keyup shows what they've typed in preview</p>

<p>new lines aren't working</p>

<pre><code>    $('input, textarea').keyup(function(){        
            var value = $(this).attr('value').replace('\n', '&lt;br /&gt;').replace('\r', '&lt;br /&gt;');
            $('p.preview').html(value);
    })
</code></pre>
