Treejs is a light weight jquery plugin, that provides interactive trees to show data in Tree structure. It is absolutely free, open source. Treejs is easily extendable, and configurable, it supports HTML & JSON data sources and AJAX loading as well.
It is based on jQuery's event system, so binding callbacks on various events in the tree is possible in a very easy manner. You can easily configure it and get the checked / unchecked nodes of tree on parent, child level.
You can initialize TreeJS by using the below code:
$("#tree").treejs({ key : value });
You can initialize TreeJS by using the below code:
$("#tree").treejs({ url : 'treejs_data.php', sourceType : 'html' });Where
url
is the url
for the ajax()
call.
You can initialize TreeJS by using the below code:
$("#tree").treejs({ sourceType : 'json', dataSource : jsonObj });Where
jsonObj
is a JSON Object. $("#tree").getCheckedParentNodes();
$("#tree").getUncheckedParentNodes();
$("#tree").getCheckedChildNodes();
$("#tree").getUncheckedChildNodes();
$("#tree").refresh();