At the time of adding endpoints make sure that you also assign them Uuid based on the element it is placed on. You can connect two endpoints in jsPlumb as
<script type="text/javascript" src="Jquery\jq.js"></script>
<script type="text/javascript" src="Jquery\jq-ui.min.js"></script>
<script type="text/javascript" src="jsPlumb-master\build\demo\js\jquery.jsPlumb-1.4.1-all-min.js"></script>
<div id="main">
<div id="block1" class="node">node 0</div>
<div id="block2" class="node">node 1</div>
<div id="block3" class="node">node 2</div>
<div id="block4" class="node">node 3</div>
</div>
<script type="text/javascript">
var targetOption = {anchor:"TopCenter",
maxConnections:-1,
isSource:false,
isTarget:true,
endpoint:["Dot", {radius:8}],
paintStyle:{fillStyle:"#66FF00"},
setDragAllowedWhenFull:true}
var sourceOption = {anchor:"BottomCenter",
maxConnections:-1,
isSource:true,
isTarget:false,
endpoint:["Dot", {radius:8}],
paintStyle:{fillStyle:"#FFEF00"},
setDragAllowedWhenFull:true}
jsPlumb.bind("ready", function() {
jsPlumb.addEndpoint('block1', targetOption);
jsPlumb.addEndpoint('block1', sourceOption);
jsPlumb.addEndpoint('block2', targetOption);
jsPlumb.addEndpoint('block2', sourceOption);
jsPlumb.addEndpoint('block3', targetOption);
jsPlumb.addEndpoint('block3', sourceOption);
jsPlumb.addEndpoint('block4', targetOption);
jsPlumb.addEndpoint('block4', sourceOption);
jsPlumb.draggable('block1');
jsPlumb.draggable('block2');
jsPlumb.draggable('block3');
jsPlumb.draggable('block4');
});
</script>