I am new to Fancytree plugin of Jquery.
I want to lazy load nodes of tree.
I am unable to load these nodes from different sources.
Both the nodes are getting data from same single source. I want node "Lazy Folder1" should load data from sample1.json and node "Lazy Folder2" should load data from sample2.json
$(function(){
var sampleSource = [
{ title: "Lazy Folder1", lazy: true },
{ title: "Lazy Folder2", lazy: true }
];
$("#tree").fancytree({
source: sampleSource,
lazyLoad: function(event, data) {
data.result = { url: "sample1.json" };
}
});
});
Following is link to plunker:-