I want a tree view with code behind of JavaScript in which I just want to add path of files and it show me the whole directory in tree and when I select a node it show me the contents of file just like file explorer do. The nodes should be in divs.
Please give the links from where I can download the code.
Actually I want to build the tree of
var cars = [{
"Root": "",
"Node": "Pakistan",
"SubNode": [{
"Root": "Pakistan",
"Node": "Punjab",
"SubNode": [{
"Root": "Punjab",
"Node": "Lahore",
"SubNode": [{}]
},
{
"Root": "Punjab",
"Node": "Multan",
"SubNode": [{}]
}]
},
{
"Root": "Pakistan",
"Node": "Khaiber",
"SubNode": [{
"Root": "Khaiber",
"Node": "Peshawar",
"SubNode": [{}]
},
{
"Root": "Khaiber",
"Node": "Sawat",
"SubNode": [{}]
}]
},
{
"Root": "Pakistan",
"Node": "Balochistan",
"SubNode": [{
"Root": "Balochistan",
"Node": "Quetta",
"SubNode": [{}]
},
{
"Root": "Balochistan",
"Node": "Gawadar",
"SubNode": [{}]
}]
},
{
"Root": "Pakistan",
"Node": "Sindh",
"SubNode": [{
"Root": "Sindh",
"Node": "Karachi",
"SubNode": [{}]
},
{
"Root": "Sindh",
"Node": "Haiderabad",
"SubNode": [{}]
}]
}]
}];