I have the following jquery code:
$(document).delegate('.draggable','mousedown', function() {
...
var connected_nodes = $(".linked-to" + node_num); //all the nodes connected to the selected node
var lines = $("div[id*='"+node_num+"']"); //all the lines which are connected to selected node
...
$(this).on('mousemove.link', dragNodes);
function dragNodes(connected_nodes, lines)
{
...
I am trying to pass connected_nodes and lines into the function. I tried doing
$(this).on('mousemove.link', dragNodes(connected_nodes, lines));
and then everything stopped working. What am I doing wrong?
(Since it doesn’t look like you want to expand the question. I shall try answering with what is available.)
Try: