I've recently followed this example but I'm struggling to get the live position of div's and updating the connecting line with the relevant position.
Lines connecting to responsive elements
Example of my work here https://jsfiddle.net/spencer1997/vktg31e2/24/
How to draw a line between two divs
Need it to be something like this :
$('.btn').animate({ 'margin-left':'200px', 'margin-top':'70px'}, 3000)
setInterval(function(){
var div = $('.btn').offset();
$( ".live-position" ).text( "left: " + div.left + ", top: " + div.top );
}, 100);
https://jsfiddle.net/rpgpp2mp/
Any help will be greatly appreciated.