1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
--- title: onCanMove name: options-oncanmove --- You can override this function to determine if a node can be moved. {% highlight js %} $('#tree1').tree({ data: data, dragAndDrop: true, onCanMove: function(node) { if (! node.parent.parent) { // Example: Cannot move root node return false; } else { return true; } } }); {% endhighlight %}