jquery - Is there way to identify connected div by clicking connection line ? connections js -


i'm using connections js connect components in web app. want delete connection line when double click on line. want identify connected components. please me fix issue.

[jsfiddle link][1]

  [1]: https://jsfiddle.net/sl_mahasona/3sv4t3es 

i've changed following code achieve wanted results udara

$(document).ready(function() {   $(".draggable").draggable();   $('#draggable3').connections({     to: '#draggable4',     'class': 'demo'   });   $.repeat().add('connection').each($).connections('update').wait(0); }); 

$(document).ready(function() {   $(".draggable").draggable();   $('#draggable3').connections({     to: '#draggable4',     'class': 'demo',     'data-from': '#draggable3',     'data-to': '#draggable4'   });   $.repeat().add('connection').each($).connections('update').wait(0);    $(document).on("dblclick", ".demo",function() {     var = $(this).attr("data-from");     var = $(this).attr("data-to");     alert("from: " + + " - to: " + to)     $(this).remove()   }) }); 

demo here


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -