I want to break my string using javascript which is fetching some data from a php file using ajax. The php is returning the correct data, however the javascript doesn't treat a <br> tag properly. This is my ajax code and i am using it to replace the current text in that span.
type: "post", url: "some_php.php", data: "name="+name,
success: function(data) {
$('#someDiv').text(data);
}
Using console.log(data) i get the output as:
Some<br>Address<br>to<br>be<br>borken
No i want it to output as
Some
Address
to
be
broken