title: JS Draw line between two or more points
body: <p>i need to draw a line between two  tags or  tags.  </p>
  
  <p>Example:<br>
  <a href="http://caitriona.github.io/connect-the-dots/" rel="nofollow">http://caitriona.github.io/connect-the-dots/</a>  </p>
  
  <p>I need to do something like this but not like in this script, in an order but randomly.<br>
  You can click on "P1" and then on "P2" and the line will be drawn. But if you click on "P1" and then on "P3" an error message should appear (that's not the problem).  </p>
  
  <p>My problem is, that I'm not so much a javascript crack to draw the line between the points.  </p>
  
  <p>Can someone point me to the right direction?<br>
  Thank you!  </p>