JsTree v3.0 drag and drop plugin. Reference target node upon dropping

后端 未结 8 862
南笙
南笙 2021-01-12 09:30

I use drag and drop plugin of jsTree library (ver. 3.0) With the following code I can bind to the end of drag\'n\'drop action, but I can not see a way to get the reference t

8条回答
  •  情话喂你
    2021-01-12 10:19

    I had same problem. I found other solution than event dnd_stop.vakata, which returns old data before changed position.

    This works:

    $('#jstree_demo_div').on("move_node.jstree", function (e, data) {
       //data.node, data.parent, data.old_parent is what you need
    
       //console.log(data);
       alert(data.node.id);
       alert(data.parent);
    });
    

提交回复
热议问题