title: How to show and hide a nodes text with button click and mouseover/mouseout ? D3/JS
body: <p>I have this piece of code that runs at a click of a button</p>
  
  <pre><code>function showTextToolTip(d){
  d3.selectAll(".node").append("text")
      .attr("dx", "12")
      .attr("dy", "-6")
      .style("text-anchor", "start")
      .text(function(d) { return d.identifier; });     
  }
  </code></pre>
  
  <p>It shows the text on every node on screen. Which is great. But how do I go about clicking it again to make the text disappear ? </p>
  
  <p>Also I wish to do this on 'mouseover' and 'mouseout' event. So when i go over the node the text shows, but I am sure if I know the question of the first answer I will be able to do the second part </p>