JSFiddle - React, Tailwind, and code Playground

by Akram kamal

HTML

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://static.planetteamspeak.com/scripts/ts3/treeview/classic/tree.css">
<script src="https://static.planetteamspeak.com/scripts/ts3/treeview/tree.js"></script>
<div class="container">
    
    <h1>TS3 Server Tree</h1>
    
    <p>
        <button type="button" class="btn btn-info btn-sm" id="expand">
            <span class="glyphicon glyphicon-plus"></span> Expand All
        </button>
        
        <button type="button" class="btn btn-info btn-sm" id="collapse">
            <span class="glyphicon glyphicon-minus"></span> Collapse All
        </button>
    </p>
    
    <div id="tsviewer"></div>
    
</div>

JavaScript

$("#tsviewer").tsviewer({
    host: "82.211.30.15",
    port: "9987"
});
      
$("#expand").click(function() {
    $("#tsviewer").tsviewerExpand();
});
      
$("#collapse").click(function() {
    $("#tsviewer").tsviewerCollapse();
});