Search code examples
jqueryjsplumb

Get the previous jsPlumb instance and create connection to it in jquery


I am using jsPlumb to create a flow chart.

And I add jsPlumb instances(nodes) dynamically on some event.

Whenever I add jsPlumb instancee I want to create a connection of it with the previous added node.

Is there a way to get the id or some useful data of the previously added node.


Solution

  • I think a simple solution will be having a global variable. Whenever you will add a new node store its id in this variable. and while creating a new node use already added id from this variable. All the best :-)