JSFiddle - React, Tailwind, and code Playground

by elone sampaio

HTML

<script src="http://destroydrop.com/javascripts/tree/example/dtree.js"></script>
<link rel="stylesheet" href="http://destroydrop.com/javascripts/tree/example/dtree.css">
<script src="http://destroydrop.com/javascripts/tree/example/img/"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
<html>
 
<head>
	<title>Menu tree</title>
 
	
</head>
    	
 

 
<body>
 
    <div class="dtree"> </div>
    </body>
 
    
</html>

JavaScript

$(document).ready(function{
		d = new dTree('d');
		d.add(0,-1,'Meu Menu tree');
		d.add(1,0,'Pata 1','#');
		d.add(2,0,'Documento 2','#');
		d.add(3,1,'Pasta 1.1','#');
		d.add(4,0,'Documento 3','#');
		d.add(5,3,'Pasta 1.1.1','#');
		d.add(6,5,'Documento 1.1.1.1','#');
		d.add(7,0,'Documento 4','#');
		d.add(8,1,'Documento 1.2','#');
		d.add(9,0,'Minhas Imagens','#','Pictures I've taken over the years','','','imgfolder.gif');
		d.add(10,9,'Viagem para o Sul','#','Pictures of Gullfoss and Geysir');
		d.add(11,9,'Carros antigos','#');
		d.add(12,0,'Lixeira','#','','','','trash.gif');
		d.draw();
});