$(document).on('mouseup', '.agent-wrapper', function(info){
console.log(info); // Everything is working fine
console.log(this);
});
.agent-wrapper
represents an element-wrapper for all jsPlumb objects.
$(document).on('mouseup', 'div.node', function(info){
console.log(info);
console.log(this);
});
How can I retrieve the element-node inside the jsPlumb-wrapper for the "mouseup" event?
HTML
<div id="flume-AGENT-1" class="agent-wrapper" index="0">
<div data-nodetype="source" class="w node jsplumb-draggable jsplumb-droppable">
Element 1
<div class="ep"></div>
</div>
<div data-nodetype="source" class="w node jsplumb-draggable jsplumb-droppable">
Element 2
<div class="ep"></div>
</div>
</div>
When I press down on the first element and release on the second, I am unable to get the target element in JavaScript. ... How do I obtain the event.target?
It seems like jsPlumb unbinds all events related to elements within its wrapper ... but I need to access this element. Any suggestions?