I have two paragraphs on my page and I need to draw a line between them. Now, I currently store the positions of the two paragraphs inside a database and I have access to them, I just don't know what to do from here. Some people have suggested I subtract certain values and then multiply.
<p> 1: position_x (top) : 38 position_x (left): 341 <p>2: position_x (top) :181 position_x (left): 597
Now to calculate the distance someone suggested something like this:
var algorith1 = $node1X - $node2Y; var algorith2 = $node1Y - $node2X; var final = $algorith1*$algorith2;
Anyone shed any help on this?