jsPlumb provides a way to "plumb" elements of a UI together.
jsPlumb is javascript library that allows you to connect elements on the screen using SVG, Canvas or VML, depending on the capabilities of the browser. It can be used with jQuery, MooTools or YUI3 (or another library of your choice if you feel like implementing an adapter for it).