title: How can I make double click event on node in d3.js?
body: <p>I want to make double click event on nodes.
  So I tried </p>
  
  <pre><code>.on("dbclick",function(d){return "http://google.com");});
  </code></pre>
  
  <p>and </p>
  
  <pre><code>.bind({"dbclick",function(d){alert("hello")} });
  </code></pre>
  
  <p>But all failed. Can anyone help me?</p>
  
  <p>Full codes are below.</p>
  
  <pre><code>var node = svg.selectAll(".node")
      .data(graph.nodes)
      .enter().append("g")
      .attr("class", "node")
      //.on("dbclick",function(d){return "http://google.com");});
      //.attr("xlink:href", function(d){return d.url;}
      .call(force.drag);
      //.bind({"dbclick",function(d){alert("hello")} });
  </code></pre>
  
  <hr>
  
  <p>Finally, I used a below method. (dblclick also works)</p>
  
  <pre><code>var node = svg.selectAll(".node") .data(graph.nodes) .enter().append("a") 
                .attr("class", "node") .attr("target", "_blank")
                .attr("xlink:href", function(d){return "google.com";;}) 
  </code></pre>