日期:2014-05-16  浏览次数:20424 次

有熟悉jstree的同志吗.?请问如何在jsTree中的Node节点加入链接的问题,百分送上
jstree通过前台js生成了树,但是没有链接,js代码如下

 $(function() {
            $("#demo0").bind('loaded.jstree', function(e, data) {
                // invoked after jstree has loaded
                $('#demo1>ul>li').addClass('topMenu');
            }).jstree({
            "themes": { "theme": "classic" },
                "json_data": {
                    "ajax": {

                        "type": "POST",
                        "dataType": "json",
                        "contentType": "application/json;",
                        "url": "/Desktop/MenusFunc.aspx/GetAllNode",
                        "data": function(node) {
                        if (node == -1) {
                            return '{ "operation" : "get_children", "parentId" : ' + 1 + '}';
                        } else {
                            return '{ "operation" : "get_children", "parentId" : ' + $(node).attr("id") + '}';
                        }
                        },
                        "success": function(retval) {

                            return retval.d;

                        }
                    }