mercredi 18 mars 2015

How to create a JSON or HTML file that dynamically mirrors file directory structure for jsTree 3.0


I am looking to create a JSON OR HTML file that will accurately give the folder/file structure for a directory for use with jsTree 3.0 (www.jstree.com). I want to make it AJAX/lazy load so that each file folder is loaded when the user requests it. Each link in the jsTree will be used to fire a function. There are a few good pages on Google that mentioned NodeJS, NPM, Grunt, angularJS, expressJS... the list goes on ... but its a bit over my head as a beginner.


I had looked at using HTML data to make the tree structure, but I again don't know how to do this 'dynamically', or work with the server side. I'd like to check the directory structure of at after the document is ready (jQuery), then have the tree read the JSON file.


How do I do this? Is there a better way to do this?


Please and thank you :)





Aucun commentaire:

Enregistrer un commentaire