An open API service indexing awesome lists of open source software.

https://github.com/jaideepghosh/bootree

A simple solution for displaying check-boxes in hierarchical tree structures (i.e. a Tree View) with Amazing Bootstrap.
https://github.com/jaideepghosh/bootree

bootstrap checkbox jquery treeview

Last synced: 6 months ago
JSON representation

A simple solution for displaying check-boxes in hierarchical tree structures (i.e. a Tree View) with Amazing Bootstrap.

Awesome Lists containing this project

README

          

# BooTree

A simple solution for displaying check-boxes in hierarchical tree structures (i.e. a Tree View) with Amazing Bootstrap.

![BooTree Screenshot](https://i.imgur.com/eHr71T2.png)

## Dependencies

1. [jQuery v2.1.3 (>= 1.9.0)](http://jquery.com/)
2. [Bootstrap v3.3.4 (>= 3.0.0)](http://getbootstrap.com/)

## Getting Started

### Installation

Include the following files in your project.

1. bootree.min.css
2. bootree.min.js

### Usage

Add the following resources in your html file.

```





```

The component will bind to any existing DOM element.

```


```

To initialize the BooTree and plot the check-boxes in #tree:

```

$(document).ready(function () {
var tree = $('#tree').tree({
primaryKey: 'id',
uiLibrary: 'bootstrap',
dataSource: [ { id: 1, text: 'Apple', children: [ { id: 2, text: 'Avocado' } ] } ]
checkboxes: true
});
$('#btnSave').on('click', function () {
var checkedIds = tree.getCheckedNodes();
alert(checkedIds);
});
});

```

# Example

You can see BooTree [here](https://jaideepghosh.github.io/BooTree/example/index.html).