Reputation: 2041
First let me starte that I've been psending the last 2 hours searching the web and trying solutions, nothing worked. I've been trying to make a new line in a Paragraph, but do'sent work. I'm using Jquery mobile and editing a paragraph with $('.selector').text(); from a javascript.
I got the follow code:
function popupBasicPris() {
$('#prisMatchPopup').text("Du har indtastet: <br />"+
"Pris: " + document.getElementById("textinputpris").value.toString() +
"<br /> Vil du sende?");
}
The code is run from a button click.
My problem is that it just writes
instead of making a new line in the shown text.
Upvotes: 1
Views: 2161
Reputation: 7680
function popupBasicPris() {
$("#prisMatchPopup").html(
"Du har indtastet: <br /> Pris: " + $("#textinputpris").val() + "<br /> Vil du sende?"
);
}
Upvotes: 0