How to use jstree v3 plugin with reorder only

1.6k views Asked by At

I am using jsTree V3.0.8 (http://www.jstree.com/)

how to reorder only when use dnd plugin like at V1(http://johntang.github.io/JsTree/_docs/dnd.html#demo2)

1

There are 1 answers

1
vakata On BEST ANSWER

Use the check_callback option like this:

"check_callback" : function (op, node, par, pos, more) {
    if(more && more.dnd) {
        return more.pos !== "i" && par.id == node.parent;
    }
    return true;
},

Here is a demo: http://jsfiddle.net/DGAF4/509/