title: Is there a simple way to create a hyperlink/javascript-action on a node double-click in vis.js?
body: <p>Defining nodes in vis.js, <a href="http://visjs.org/network_examples.html" rel="nofollow">http://visjs.org/network_examples.html</a> , looks like this:</p>
  
  <pre><code>var nodes = [
  {id: 1, label: 'Node1'},
  {id: 2, label: 'Node2'},
  {id: 3, label: 'Node3'},
  {id: 4, label: 'Node4'}
  ];
  </code></pre>
  
  <p>What I'm trying to find out is, can you create a node double-click (or other event/click type) action, something like so:</p>
  
  <pre><code>var nodes = [
  {id: 1, label: 'Node1', double-click: 'Arbitrary_OnClick_Function()'},
  {id: 2, label: 'Node2', double-click: 'document.getElementById("div1").innerHTML="Node 2 was clicked"'},
  {id: 3, label: 'Node3', double-click: 'https://www.google.com;target="_blank"'},
  {id: 4, label: 'Node4', double-click: '#SomePageSection'}
  ];
  </code></pre>
  
  <p>Perhaps there's a way to do this combining with angular.js (github.com/edgaraafelix/angular-visgraph) or non-simply through vis.js method <code>on(event,callback)</code> (<code>http//visjs.org/docs/network.html#Methods</code> and <a href="http://visjs.org/docs/network.html#Events" rel="nofollow">http://visjs.org/docs/network.html#Events</a>).</p>