I am using append function. Function is working fine. Everything is ok.
But when is press some ENTERS (Break Line) in Textarea. It appears in the form of New Lines in Textarea but when it appends to HTML it doesnt appears in the Form of New Lines.
Take a Quick Look at this Image:
Here is my DEMO:
Here is my Jquery Code Or you can simply visit my JsFiddle DEMO:
$('.add_more').click(function()
{
var description = $('#description').val();
$(".append_data").append('<tr><td>'+description+'</td></tr>');
});
TRy this demo http://jsfiddle.net/YRKxR/18/
white-space :pre is required
$('.add_more').click(function()
{
var description = $('#description').val();
$(".append_data").append('<tr><td style="white-space:pre;">'+description+'</td></tr>');
});
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments