I am trying to replace a phone number with a new phone number.
However, it's not working with the <p> tags right now.
I can replace it with a word and it changes it. But when I use HTML it doesn't work
<script>
$(function() {
$("#navbarPhoneNumber").html("<p id='phonenumber'></p>");
});
</script>
You can use innerHTML after you get your element to replace your text
document.getElementById("navphonenumber").innerHTML = phonenumber;
Here is a solution I wrote
Don't use jquery for this simple example, just use DOM's simple API function .getElementById.
document.getElementById('navbarPhoneNumber').innerText = <new phone number>