When i try to replace string 0,50 with javascript 'mydiv' has been deleted/moved
Example
<div id="para1"><div class="mydiv"></div>0,50</div>
When i try to replace 0,50 by 80 i do :
document.getElementById("para1").innerText = "80"
or with jQuery
$("#para1").text("80")
then the result is :
<div id="para1">80</div>
during the operation it delete <div class="mydiv"></div>
How can i do to keep structure of html and result like this :
<div id="para1"><div class="mydiv"></div>80</div>