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
Try like
var value = $(this).(); var contentAttr = $(this).attr('name'); $('.'+contentAttr+'').html(value.replace(/\r?\n/g,""));
This is the DEMO