Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
33
rated 0 times [  38] [ 5]  / answers: 1 / hits: 17205  / 8 Years ago, sat, january 23, 2016, 12:00:00

I am trying to append a new line using this this code. I have tried n and only but no solution. What can I do now?



function infC(name) {
jQuery(#dialog).text(information_by_equipment[name][1]).append(information_by_equipment[name][2]);
event.stopPropagation();
}

More From » jquery

 Answers
5

The .append() appends HTML. You need to use <br />:



jQuery(#dialog)
.text(information_by_equipment[name][1])
.append(<br /> + information_by_equipment[name][2]);

[#63582] Friday, January 22, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
neildrews

Total Points: 166
Total Questions: 103
Total Answers: 85

Location: Moldova
Member since Sat, Aug 6, 2022
2 Years ago
;