I\'m using d3 to append some elements on enter() and then update them later. However, the next time i try to select those elements the selection is much larger than the orig
Here is a much better way to do it:
var parent = d3.selectAll(".myParentClass"); parent.each(function(d,i) { var children = d3.selectAll(this.childNodes); console.log(children); });
This way you don't need to unnecessarily add classes to what could be 100's of (or even more) child nodes.