javascript - D3, remove the .enter created div "bubble.selectAll("circle").remove();" -
javascript - D3, remove the .enter created div "bubble.selectAll("circle").remove();" - i new d3js, , learning own, what planing is, create circle , erase after creation, , after 800 ms, create 1 time again wise goes. i need know, doing wrong here. <html> <head> <script src="http://d3js.org/d3.v3.min.js"></script> <meta charset=utf-8 /> <title>js bin</title> </head> <body> <script> var bubble = d3.select("body") .append("svg") .attr("width", '400px') .attr('height', '400px') .selectall(".circle"); //animat(); function animat(){ bubble.data([1,2,3,4,5]) .enter() .append("circle") .attr("cx", function(d,i) { homecoming d*10*(i+1); }) .attr("cy", function(d,i) {