TreeJS - A Jquery tree Plug-in

Overview - What is TreeJS?

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.

Configuration

You can initialize TreeJS by using the below code:

                                            $("#tree").treejs({
                                                    key : value
                                            });
                                            

Demo

HTML data

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.
Click here to check the Html format

JSON data

You can initialize TreeJS by using the below code:

                                            $("#tree").treejs({
                                                    sourceType  : 'json',
                                                    dataSource  : jsonObj
                                            });
                                            
Where jsonObj is a JSON Object.
Click here to check the JSON format

Events Handling

Get all cheked parent nodes:
                                                $("#tree").getCheckedParentNodes();
                                            
Get all un-cheked parent nodes:
                                                $("#tree").getUncheckedParentNodes();
                                            
Get all cheked child nodes:
                                                $("#tree").getCheckedChildNodes();
                                            
Get all un-cheked child nodes:
                                                $("#tree").getUncheckedChildNodes();
                                            
Refresh tree:
                                                $("#tree").refresh();