The code is like this:
$('#description').text(info + '<br>' + footnote);
But instead of:
Welcome to the website!
Copyright (c) 2015
It shows:
Welcome to the website!<br>Copyright (c) 2015
If I change '<br>'
to '\n'
, then it displayed as nothing (white space)
Welcome to the website! Copyright (c) 2015
How can I add newline to a div using jQuery? Thanks.
' + footnote);` – Tushar Dec 21 '15 at 06:36