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() }) });
Comments
Post a Comment