JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="https://rawgit.com/vakata/jstree/master/dist/themes/default/style.min.css">
<script src="https://rawgit.com/vakata/jstree/master/dist/jstree.min.js"></script>
<div id="jstree_demo" class="jstree-default">
<ul>
<li>1
<ul>
<li>1-1</li>
<li>1-2</li>
<li>1-3</li>
<li>1-4</li>
<li>1-5</li>
<li>1-6</li>
<li>1-7</li>
<li>1-8</li>
</ul>
</li>
</ul>
</div>
<div id="result"></div>
JavaScript
jQuery(function($) {
$(document).on('dnd_stop.vakata', function(e, data) {
var origin = $(data.element);
var target = $(data.event.target);
$('#result').html(
'<div><b>Target:</b> ' + target.html() + '</div>' +
'<div><b>Origin:</b> ' + origin.html() + '</div>'
);
})
$('#jstree_demo').jstree({
"core" : {
"check_callback" : true,
"themes" : { "stripes" : true },
},
"plugins" : [
"dnd"
]
});
});