开发者

How can I disable moving in jsTree, but not disabling drag'n'drop plugin?

How to disable moving in jsTree 1.0, but not dis开发者_开发问答abling dnd plugin?

Thanks.


I found the solution.

   $("#tree").jstree({
//...
      "crrm" : {
        "move" : {
          "check_move" : function (m) {
            return false;
          }
        }
      }
//...
      "plugins" : [ "crrm", "dnd" ]
    });


    "crrm" : {
            "move" : {
                "check_move" : function (m) {
                    if(m.cr.attr("id") == m.r.attr("id")){
                        return true;
                    }else{
                        return false;
                    }
                }
            }
    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜