Reputation: 2360
This jsfiddle explains it all https://jsfiddle.net/qphoria/jh7p0oq2/1/
How do I make the div appear as multiple lines without showing the literal <br>
tags?
Upvotes: 1
Views: 29
Reputation: 285
use .html() will taking the str as html and render it. .text() will only render str as text.
$('#display').html(str);
Upvotes: 0
Reputation: 83699
Could probably try
$('#display').html(str);
https://jsfiddle.net/j56vdyfa/1/
Upvotes: 2