How to access the parentNode of a d3.js selection?

前端 未结 4 1245
情歌与酒
情歌与酒 2020-12-05 06:46

I\'ve created the following document:


    ​
    <         


        
4条回答
  •  爱一瞬间的悲伤
    2020-12-05 07:06

    Here's a quick way to move the mouseover element to the front:

    selection.on("mouseover", function() { this.parentNode.appendChild(this); });
    

    See also a related thread in the d3-js group.

提交回复
热议问题