Basically I have below span
:
<span id="test">hello <span id="what">john</span>, How are you?</span>
I just want to change the text of test
span without removing the it's children/what
span.
I tried jquery text()
function, but that seems to remove the children.
See demo here: https://jsfiddle.net/rf9x7zq3/4/