Can anyone help me to get this work in d3js
My html tag are as below
<div id="source1"><ul><li>Source</li></ul></div>
i want to modify the <li>Source</li>
with <li>some other text</li>
by removing all the UL LI tags in DIV id source1 and creating new UL LI tags in div id source1
My code is here
d3.selectAll("ul").remove()
d3.selectAll("li").remove()
var test=document.getElementbyId('source1');
var ul=document.createElement('ul');
document.body.appendChild(test);
test.appendChild(ul);
var li=document.createElement('li');
ul.appendChild(li);
li.innerHTML="some other text";