I’m trying to set some text to a label dynamically using jQuery. But i can’t get the <br> or \n to render and give me new lines. It all shows up on the same line and wraps.
here is my code On JsFiddle
My html:
<label id="myLabel" />
My Javascript:
$("#myLabel").text("This is my first line \n This should be my second line.");
text()will escape any html code, so instead usehtml()