disable inner / child drop for specific cases

124 views
Skip to first unread message

gaurav n bhite

unread,
Sep 17, 2020, 12:58:11 PM9/17/20
to jsTree
Hello,
I am using jstree Drag/Drop plugin. and its works perfectly .has anyone knows how to drag only one node and rest of nodes are disabled??







code:-
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" />



<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<script src="app.js"></script>

<script>
$(document).ready(function() {
$("#data-jstree").jstree({
"core" : {

"check_callback" : true
},
"plugins" : [ "dnd"]

});

});





</script>
</head>
<body>

<div id="data-jstree">
<ul>
<li>ONe</li>
<li>Two</li>
<li>Node With Children
<ul >

<li>child1</li>

<li>child2</li>
</ul>
<li>
Banana
</li>

</li>
<li>Three</li>
<li>Four</li>
</ul>
</div>
</div>


</body>
</html>







gaurav n bhite

unread,
Sep 17, 2020, 1:50:57 PM9/17/20
to jst...@googlegroups.com
I have to disable child node creation is specific parent nodes in jstree. Has anyone have any idea about this?
--
You received this message because you are subscribed to a topic in the Google Groups "jsTree" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jstree/cCwTSvhm0iQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jstree+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jstree/7e01bc85-8787-4891-9fe1-174a85d567a2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages