afraxas
9/2/2014 - 9:10 AM

jstree ajax test

 $('#domain').on("loaded.jstree", function (event, data) {

            }).on("ready.jstree",function (event, data) {

            }).on("hover_node.jstree",function (event, data) {
            }).on("model.jstree",function (event, data) {
            }).on("init.jstree",function (event, data) {
            }).jstree({
/*                'core': {
                    'data': json_data
                },*/
                'core' : {
                    'data': {
                        'url': 'jtst.json/',
                        'data': function (node) {
                            return { 'id': node.id };
                        }
                        ,success : function(value){
                            console.log(value);
                            value[3].state = {"selected" : true};

                        }
                        ,error : function(){
                            alert();
                        }
                    }
                },
                "plugins" : [ "wholerow", "checkbox", "search"]
            }).on("select_node.jstree", function (event, data) {
            });