Using addClass with new-line
Hi,
After retrieving data from database, I use this method to update one of my divs objects:
-
$("<div>").addClass("message-text").text(txtText).appendTo(div);
unfortunately, my txtText variable has HTML tags like <BR> and there are ignored.
is there a way that my tags won't be ignored ? or how do I put a new line in my div object ?
Thanks in advance,
Dimitry