I have an h1 with id of toptitle that is dynamically created, and I am not able to change the HTML. It will have a different title depends on a pag
h1
toptitle
This should work fine (using .text():
$("#toptitle").text("New word");