I am using jquery fancy tree to represent a tree in my web app.
https://github.com/mar10/fancytree
Here's my code as below. The issue is, when the source URL /documents/folders, returns an empty list, I would like my html to show the text "No Documents found". I searched the API but there is no way of doing this directly with the plugin.
I am new to the world of webapps. Could someone please point me in the right direction?
<div class="row" id="toprow">
<div class="col-md-4" id="treeContainer">
<h4>Choose a Document Type from the drop-down</h4>
<div id="tree">
</div>
</div>
</div>
<script>
$(function(){
$("#tree").fancytree({
source: {
url: "/documents/folders"
},
});
});
</script>