I am tying to make a simple effect using keyup() in jQuery. I just want that when user types into the textarea then the text which user types will
keyup()
textarea
Use this line: Fiddle
$('.'+contentAttr+'').html(value.replace(/\n/g,""));
The problem was that newlines don't create linebreaks in html, but will.